mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
FIX: call DismissAndNotify to manual close popup
Change-Id: I395708a98dda390f81d52151c9c52ba367de5a3d
This commit is contained in:
parent
b03a93d7fc
commit
8300c386e0
2 changed files with 4 additions and 11 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <wx/dcgraph.h>
|
||||
|
||||
BEGIN_EVENT_TABLE(DropDown, wxPanel)
|
||||
BEGIN_EVENT_TABLE(DropDown, wxPopupTransientWindow)
|
||||
|
||||
EVT_LEFT_DOWN(DropDown::mouseDown)
|
||||
EVT_LEFT_UP(DropDown::mouseReleased)
|
||||
|
@ -46,14 +46,6 @@ DropDown::DropDown(wxWindow * parent,
|
|||
|
||||
// BBS set default font
|
||||
SetFont(Label::Body_14);
|
||||
#ifdef __WXOSX__
|
||||
Bind(wxEVT_ACTIVATE, [this](auto & e) {
|
||||
if (!e.GetActive()) {
|
||||
Hide();
|
||||
OnDismiss();
|
||||
}
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
void DropDown::Invalidate(bool clear)
|
||||
|
@ -373,6 +365,7 @@ void DropDown::mouseReleased(wxMouseEvent& event)
|
|||
pressedDown = false;
|
||||
if (hover_item >= 0) // not moved
|
||||
sendDropDownEvent();
|
||||
DismissAndNotify();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue