Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2021-12-09 18:00:12 +0300
committerYuSanka <yusanka@gmail.com>2021-12-09 18:00:12 +0300
commitf1429f026c04af53749cec547929cc1cb97de83b (patch)
treeaf0a99dc7052af4f609cbd88d992a1e714432e4b
parent27883caa08983f7c963cad8f185e3e45fc1432eb (diff)
RichMessageDialog on non-MSW platforms: Set escape ID to wxID_CANCEL
+ Fixed behavior of the "Open hyperlink" dialog when "cross"(close window button) is clicked.
-rw-r--r--src/slic3r/GUI/MsgDialog.hpp4
-rw-r--r--src/slic3r/GUI/OptionsGroup.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/slic3r/GUI/MsgDialog.hpp b/src/slic3r/GUI/MsgDialog.hpp
index 9fde187a6..ea424c176 100644
--- a/src/slic3r/GUI/MsgDialog.hpp
+++ b/src/slic3r/GUI/MsgDialog.hpp
@@ -293,7 +293,9 @@ public:
const wxString& message,
const wxString& caption = wxEmptyString,
long style = wxOK)
- : wxRichMessageDialog(parent, message, caption, style) {}
+ : wxRichMessageDialog(parent, message, caption, style) {
+ this->SetEscapeId(wxID_CANCEL);
+ }
~RichMessageDialog() {}
};
#endif
diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp
index 6039dcbcb..64fc4b8c8 100644
--- a/src/slic3r/GUI/OptionsGroup.cpp
+++ b/src/slic3r/GUI/OptionsGroup.cpp
@@ -984,6 +984,8 @@ bool OptionsGroup::launch_browser(const std::string& path_end)
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();
+ if (answer == wxID_CANCEL)
+ return false;
if (dialog.IsCheckBoxChecked()) {
wxString preferences_item = _L("Suppress to open hyperlink in browser");