Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PopupWindow dropdown menus do not display #4201 #5704

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/slic3r/GUI/Widgets/PopupWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,21 @@ bool PopupWindow::Create(wxWindow *parent, int style)
if (!wxPopupTransientWindow::Create(parent, style))
return false;
#ifdef __WXGTK__
GetTopParent(parent)->Bind(wxEVT_ACTIVATE, &PopupWindow::topWindowActiavate, this);
GetTopParent(parent)->Bind(wxEVT_ACTIVATE, &PopupWindow::topWindowActivate, this);
#endif
return true;
}

PopupWindow::~PopupWindow()
{
#ifdef __WXGTK__
GetTopParent(this)->Unbind(wxEVT_ACTIVATE, &PopupWindow::topWindowActiavate, this);
GetTopParent(this)->Unbind(wxEVT_ACTIVATE, &PopupWindow::topWindowActivate, this);
#endif
}

#ifdef __WXGTK__
void PopupWindow::topWindowActiavate(wxActivateEvent &event)
void PopupWindow::topWindowActivate(wxActivateEvent &event)
{
event.Skip();
if (!event.GetActive() && IsShown()) DismissAndNotify();
}
#endif
2 changes: 1 addition & 1 deletion src/slic3r/GUI/Widgets/PopupWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PopupWindow : public wxPopupTransientWindow

private:
#ifdef __WXGTK__
void topWindowActiavate(wxActivateEvent &event);
void topWindowActivate(wxActivateEvent &event);
#endif
};

Expand Down
Loading