mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 08:17:51 -06:00
FIX: Intercept IDLE event in DropDown to fix various problems on MacOS
Change-Id: Ia9aa96c90f1b7c3f6c33b7325dc28a4f780969c3
This commit is contained in:
parent
ace72ecdbc
commit
646934953c
5 changed files with 59 additions and 40 deletions
|
@ -9,6 +9,8 @@
|
|||
#define DD_NO_TEXT 0x2000000
|
||||
#define DD_STYLE_MASK 0x3000000
|
||||
|
||||
wxDECLARE_EVENT(EVT_DISMISS, wxCommandEvent);
|
||||
|
||||
class DropDown : public wxPopupTransientWindow
|
||||
{
|
||||
std::vector<wxString> & texts;
|
||||
|
@ -39,11 +41,17 @@ class DropDown : public wxPopupTransientWindow
|
|||
wxPoint dragStart;
|
||||
|
||||
public:
|
||||
DropDown(std::vector<wxString> &texts,
|
||||
std::vector<wxBitmap> &icons);
|
||||
|
||||
DropDown(wxWindow * parent,
|
||||
std::vector<wxString> &texts,
|
||||
std::vector<wxBitmap> &icons,
|
||||
long style = 0);
|
||||
|
||||
|
||||
void Create(wxWindow * parent,
|
||||
long style = 0);
|
||||
|
||||
public:
|
||||
void Invalidate(bool clear = false);
|
||||
|
||||
|
@ -73,6 +81,9 @@ public:
|
|||
void Rescale();
|
||||
|
||||
bool HasDismissLongTime();
|
||||
|
||||
protected:
|
||||
void OnDismiss() override;
|
||||
|
||||
private:
|
||||
void paintEvent(wxPaintEvent& evt);
|
||||
|
@ -92,7 +103,6 @@ private:
|
|||
|
||||
void sendDropDownEvent();
|
||||
|
||||
void OnDismiss() override;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue