Disable filament merge option if not SEMM

This commit is contained in:
Noisyfox
2025-10-24 19:27:20 +08:00
parent 2915e3035f
commit 9510b1a930
2 changed files with 4 additions and 5 deletions

View File

@@ -1489,10 +1489,9 @@ void MenuFactory::create_filament_action_menu(bool init, int active_filament_men
menu, wxID_ANY, _L("Delete"), _L("Delete this filament"), [](wxCommandEvent&) {
plater()->sidebar().delete_filament(-2); }, "", nullptr,
[]() {
auto& sidebar = plater()->sidebar();
return sidebar.combos_filament().size() > 1
return plater()->sidebar().combos_filament().size() > 1
// Orca: only show delete filament option for SEMM machines unless is BBL
&& sidebar.should_show_SEMM_buttons();
&& Sidebar::should_show_SEMM_buttons();
}, m_parent);
}
@@ -1502,7 +1501,7 @@ void MenuFactory::create_filament_action_menu(bool init, int active_filament_men
wxMenu* sub_menu = new wxMenu();
std::vector<wxBitmap*> icons = get_extruder_color_icons(true);
int filaments_cnt = icons.size();
int filaments_cnt = Sidebar::should_show_SEMM_buttons() ? icons.size() : 0;
for (int i = 0; i < filaments_cnt; i++) {
if (i == active_filament_menu_id)
continue;

View File

@@ -198,7 +198,7 @@ public:
void get_big_btn_sync_pos_size(wxPoint &pt, wxSize &size);
void get_small_btn_sync_pos_size(wxPoint &pt, wxSize &size);
// Orca
bool should_show_SEMM_buttons();
static bool should_show_SEMM_buttons();
void show_SEMM_buttons(bool bshow);
void update_dynamic_filament_list();