mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
ENH: refine dual extruder related UI details
jira: new Change-Id: I63dd6278f3e7d22336482dba0f178150ebe55f1d (cherry picked from commit 73c05eee3bbcbed6fc5909db638fa4bac9a75bfc)
This commit is contained in:
@@ -109,7 +109,7 @@ wxMenuItem* append_menu_item(wxMenu* menu, int id, const wxString& string, const
|
||||
}
|
||||
|
||||
wxMenuItem* append_submenu(wxMenu* menu, wxMenu* sub_menu, int id, const wxString& string, const wxString& description, const std::string& icon,
|
||||
std::function<bool()> const cb_condition, wxWindow* parent)
|
||||
std::function<bool()> const cb_condition, wxWindow* parent, int insert_pos)
|
||||
{
|
||||
if (id == wxID_ANY)
|
||||
id = wxNewId();
|
||||
@@ -123,7 +123,10 @@ wxMenuItem* append_submenu(wxMenu* menu, wxMenu* sub_menu, int id, const wxStrin
|
||||
#endif /* __WXMSW__ */
|
||||
}
|
||||
|
||||
menu->Append(item);
|
||||
if (insert_pos == wxNOT_FOUND)
|
||||
menu->Append(item);
|
||||
else
|
||||
menu->Insert(insert_pos, item);
|
||||
|
||||
if (parent) {
|
||||
parent->Bind(wxEVT_UPDATE_UI, [cb_condition, item, parent](wxUpdateUIEvent& evt) {
|
||||
|
||||
Reference in New Issue
Block a user