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");