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
This commit is contained in:
YuSanka 2021-02-10 11:24:25 +01:00
parent ba95a93a68
commit 3c37aed2f8
3 changed files with 77 additions and 4 deletions

View file

@ -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;
};
}
}