mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-16 21:42:43 +00:00
rebuild menus from scratch to remove duplicate item check and match "delete" item order
This commit is contained in:
@@ -4308,11 +4308,6 @@ void Sidebar::update_mixed_filament_list()
|
||||
edit_mixed_filament(panel_idx);
|
||||
}, edit_item->GetId());
|
||||
|
||||
auto* del_item = menu.Append(wxID_ANY, _L("Delete"));
|
||||
menu.Bind(wxEVT_MENU, [this, panel_idx](wxCommandEvent&) {
|
||||
delete_mixed_filament_at(panel_idx);
|
||||
}, del_item->GetId());
|
||||
|
||||
wxMenu* sub_menu = new wxMenu();
|
||||
std::vector<wxBitmap*> icons = get_extruder_color_icons(true);
|
||||
int filaments_cnt = icons.size();
|
||||
@@ -4345,6 +4340,14 @@ void Sidebar::update_mixed_filament_list()
|
||||
else
|
||||
delete sub_menu;
|
||||
|
||||
menu.AppendSeparator(); // ORCA use seperator for reducing accidental clicks to delete
|
||||
|
||||
// ORCA use delete item on end of menu to prevent accidental clicks. clicking to submenus(merge) already not allowed by OS
|
||||
auto* del_item = menu.Append(wxID_ANY, _L("Delete"));
|
||||
menu.Bind(wxEVT_MENU, [this, panel_idx](wxCommandEvent&) {
|
||||
delete_mixed_filament_at(panel_idx);
|
||||
}, del_item->GetId());
|
||||
|
||||
PopupMenu(&menu);
|
||||
});
|
||||
combo_and_btn_sizer->Add(menu_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(4));
|
||||
|
||||
Reference in New Issue
Block a user