mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-24 17:26:47 +00:00
FIX: speed switch popup window display bug
Jira: [STUDIO-14642] Change-Id: If95ca1b448b2d3a03c2f6d6c0b5faad4a3c04e8c (cherry picked from commit 08943207564c0256d5a5efea9440e55efb7ccea0)
This commit is contained in:
@@ -31,6 +31,11 @@ PopupWindow::~PopupWindow()
|
||||
#ifdef __WXGTK__
|
||||
GetTopParent(this)->Unbind(wxEVT_ACTIVATE, &PopupWindow::topWindowActiavate, this);
|
||||
#endif
|
||||
#ifdef __WXMSW__
|
||||
GetTopParent(this)->Unbind(wxEVT_ACTIVATE, &PopupWindow::topWindowActivate, this);
|
||||
GetTopParent(this)->Unbind(wxEVT_ICONIZE, &PopupWindow::topWindowIconize, this);
|
||||
GetTopParent(this)->Unbind(wxEVT_SHOW, &PopupWindow::topWindowShow, this);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __WXOSX__
|
||||
@@ -84,3 +89,32 @@ void PopupWindow::topWindowActiavate(wxActivateEvent &event)
|
||||
if (!event.GetActive() && IsShown()) DismissAndNotify();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __WXMSW__
|
||||
void PopupWindow::BindUnfocusEvent()
|
||||
{
|
||||
GetTopParent(this)->Bind(wxEVT_ACTIVATE, &PopupWindow::topWindowActivate, this);
|
||||
GetTopParent(this)->Bind(wxEVT_ICONIZE, &PopupWindow::topWindowIconize, this);
|
||||
GetTopParent(this)->Bind(wxEVT_SHOW, &PopupWindow::topWindowShow, this);
|
||||
}
|
||||
|
||||
void PopupWindow::topWindowActivate(wxActivateEvent &event)
|
||||
{
|
||||
if (!event.GetActive())
|
||||
Dismiss();
|
||||
}
|
||||
|
||||
void PopupWindow::topWindowIconize(wxIconizeEvent &event)
|
||||
{
|
||||
event.Skip();
|
||||
if (event.IsIconized())
|
||||
Dismiss();
|
||||
}
|
||||
|
||||
void PopupWindow::topWindowShow(wxShowEvent &event)
|
||||
{
|
||||
event.Skip();
|
||||
if (!event.IsShown())
|
||||
Dismiss();
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user