Fix of #3660 : Background processing restart and error messages

are suppressed while tracking a pop-up menu.
This commit is contained in:
bubnikv 2020-03-12 16:05:39 +01:00
parent 6866c2bdd4
commit 1d5249f9b0
2 changed files with 35 additions and 1 deletions

View file

@ -319,10 +319,20 @@ public:
Plater *m_plater;
};
// Wrapper around wxWindow::PopupMenu to suppress error messages popping out while tracking the popup menu.
bool PopupMenu(wxMenu *menu, const wxPoint& pos = wxDefaultPosition);
bool PopupMenu(wxMenu *menu, int x, int y) { return this->PopupMenu(menu, wxPoint(x, y)); }
private:
struct priv;
std::unique_ptr<priv> p;
// Set true during PopupMenu() tracking to suppress immediate error message boxes.
// The error messages are collected to m_tracking_popup_menu_error_message instead and these error messages
// are shown after the pop-up dialog closes.
bool m_tracking_popup_menu = false;
wxString m_tracking_popup_menu_error_message;
void suppress_snapshots();
void allow_snapshots();