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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2021-02-10 13:24:25 +0300
committerYuSanka <yusanka@gmail.com>2021-02-10 13:25:07 +0300
commit3c37aed2f8c52634fdc9e74a8f59f4cc505d8c3c (patch)
treef9dfd66f8f73c6fd85bbd96d911c02ae15011e30 /src/slic3r/GUI/MsgDialog.hpp
parentba95a93a687372136bd53a6b5eb7b9846ba164c2 (diff)
Fixed old (MSW specific) focus issue:
Description of issue: When for some parameter set a value which is out of rage or inaccurate and than click to another parameter, receive a warning message dialog with description of a problem. After closing of this Dialog any button on settings tab doesn't work for first click. Looks like after dialog is closed Notebook page loses a focus. Workaround: Use self-created WarningDialog (inherited from the wxDialog) instead of wxMessageDialog
Diffstat (limited to 'src/slic3r/GUI/MsgDialog.hpp')
-rw-r--r--src/slic3r/GUI/MsgDialog.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/slic3r/GUI/MsgDialog.hpp b/src/slic3r/GUI/MsgDialog.hpp
index 70032089b..20d7f8dd5 100644
--- a/src/slic3r/GUI/MsgDialog.hpp
+++ b/src/slic3r/GUI/MsgDialog.hpp
@@ -66,6 +66,27 @@ private:
};
+// Generic error dialog, used for displaying exceptions
+class WarningDialog : public MsgDialog
+{
+public:
+ // If monospaced_font is true, the error message is displayed using html <code><pre></pre></code> tags,
+ // so that the code formatting will be preserved. This is useful for reporting errors from the placeholder parser.
+ WarningDialog( wxWindow *parent,
+ const wxString& message,
+ const wxString& caption = wxEmptyString,
+ long style = wxOK);
+ WarningDialog(WarningDialog&&) = delete;
+ WarningDialog(const WarningDialog&) = delete;
+ WarningDialog &operator=(WarningDialog&&) = delete;
+ WarningDialog &operator=(const WarningDialog&) = delete;
+ virtual ~WarningDialog() = default;
+
+private:
+ wxString msg;
+};
+
+
}
}