From 3d23907056f892bd426d5722614d8f3b60a3600b Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 8 Dec 2021 10:40:47 +0100 Subject: [PATCH] Fix of the position of "PrusaSlicer: Open hyperlink" Dialog More info https://github.com/prusa3d/PrusaSlicer/issues/7419#issuecomment-988231014 --- src/slic3r/GUI/OptionsGroup.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index 84bfd1f9f6..958a912a27 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -2,6 +2,7 @@ #include "ConfigExceptions.hpp" #include "Plater.hpp" #include "GUI_App.hpp" +#include "Mainframe.hpp" #include "OG_CustomCtrl.hpp" #include "MsgDialog.hpp" #include "format.hpp" @@ -978,7 +979,8 @@ bool OptionsGroup::launch_browser(const std::string& path_end) bool launch = true; if (get_app_config()->get("suppress_hyperlinks").empty()) { - RichMessageDialog dialog(nullptr, _L("Open hyperlink in default browser?"), _L("PrusaSlicer: Open hyperlink"), wxYES_NO); + wxWindow* parent = wxGetApp().mainframe->m_tabpanel; + RichMessageDialog dialog(parent, _L("Open hyperlink in default browser?"), _L("PrusaSlicer: Open hyperlink"), wxYES_NO); dialog.ShowCheckBox(_L("Remember my choice")); int answer = dialog.ShowModal(); @@ -989,7 +991,7 @@ bool OptionsGroup::launch_browser(const std::string& path_end) _L("You will not be asked about it again on label hovering.") + "\n\n" + format_wxstr(_L("Visit \"Preferences\" and check \"%1%\"\nto changes your choice."), preferences_item); - MessageDialog msg_dlg(nullptr, msg, _L("PrusaSlicer: Don't ask me again"), wxOK | wxCANCEL | wxICON_INFORMATION); + MessageDialog msg_dlg(parent, msg, _L("PrusaSlicer: Don't ask me again"), wxOK | wxCANCEL | wxICON_INFORMATION); if (msg_dlg.ShowModal() == wxID_CANCEL) return false;