mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-07 15:51:08 +00:00
Keep the Design tab's Bodies right-click menu open on Linux
This commit is contained in:
@@ -3363,9 +3363,10 @@ DesignPanel::DesignPanel(wxWindow* parent)
|
||||
// been promising this right-click since before it existed.
|
||||
m_parts->on_menu = [this, apply_body_row](int row, const wxPoint& screen) {
|
||||
apply_body_row(row); // unconditional — see above
|
||||
// Let the modal menu take the loop after this handler returns — same CallAfter as the
|
||||
// sketch path, which learned it the hard way.
|
||||
CallAfter([this, screen] { show_offer_menu(screen); });
|
||||
// From inside the event, as the feature rows do, never CallAfter'd: wxGTK sends the
|
||||
// context menu on the right PRESS, and a menu GTK pops after that event has finished
|
||||
// has no trigger time, so the button's release closes it the moment it opens.
|
||||
show_offer_menu(screen);
|
||||
};
|
||||
// Renaming a BODY names the body itself. It does NOT rename the feature that created it:
|
||||
// an Extrude, a Cut and a Fillet all land on one body, so source_feature is one operation in
|
||||
|
||||
@@ -77,7 +77,8 @@ public:
|
||||
// the selected one.
|
||||
std::function<void(int row, int id)> on_action;
|
||||
// Context menu on a row, at a screen position; the row under the pointer is selected first,
|
||||
// unless the list is non-selectable.
|
||||
// unless the list is non-selectable. Pop the menu from inside the call: wxGTK sends it on the
|
||||
// right press, and a menu deferred past that event closes on the button's release.
|
||||
std::function<void(int row, const wxPoint& screen)> on_menu;
|
||||
// The editor committed `name` for `row`, trimmed and never empty (an empty commit cancels).
|
||||
// Runs after the editor's own events have finished, so the owner may rebuild the rows here.
|
||||
|
||||
Reference in New Issue
Block a user