fix link window appearing on wrong monitor

This commit is contained in:
GenevensiS
2026-05-24 13:25:26 +02:00
parent ae02c71be6
commit 6f526a81f1
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -20,7 +20,7 @@
// ----------------------------------------------------------------------------- : ExportCardSelectionChoice // ----------------------------------------------------------------------------- : ExportCardSelectionChoice
CardLinkWindow::CardLinkWindow(Window* parent, const SetP& set, const CardP& selected_card, bool sizer) CardLinkWindow::CardLinkWindow(Window* parent, const SetP& set, const CardP& selected_card, bool sizer)
: wxDialog(parent, wxID_ANY, _TITLE_("link cards"), wxPoint(400,-1), wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) : wxDialog(parent, wxID_ANY, _TITLE_("link cards"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
, set(set), parent(parent), selected_card(selected_card) , set(set), parent(parent), selected_card(selected_card)
{ {
// init controls // init controls
+2 -1
View File
@@ -533,7 +533,8 @@ bool CardListBase::canLink() const {
return card->findFreeLink(card->uid, set->card_uids) >= 0; return card->findFreeLink(card->uid, set->card_uids) >= 0;
} }
bool CardListBase::doLink() { bool CardListBase::doLink() {
CardLinkWindow wnd(this, set, getCard()); CardLinkWindow wnd(this, set, getCard());
wnd.CentreOnParent();
if (wnd.ShowModal() == wxID_OK) { if (wnd.ShowModal() == wxID_OK) {
// The actual linking is done in this window's onOk function // The actual linking is done in this window's onOk function
return true; return true;