Show extruder switch in motion ability page

This commit is contained in:
Noisyfox
2026-05-17 22:35:41 +08:00
parent 956fcea7e2
commit 78daf90c95

View File

@@ -486,23 +486,18 @@ void Tab::create_preset_tab()
m_main_sizer->Add(m_tabctrl, 0, wxEXPAND | wxALL, 0 );
// Orca: don't show extruder switch for now
#if 0
if (dynamic_cast<TabPrinter *>(this) || dynamic_cast<TabPrint *>(this)) {
m_extruder_switch = new SwitchButton(panel);
m_extruder_switch->SetMaxSize({em_unit(this) * 24, -1});
m_extruder_switch->SetLabels(_L("Left"), _L("Right"));
m_extruder_switch->Bind(wxEVT_TOGGLEBUTTON, [this] (auto & evt) {
evt.Skip();
dynamic_cast<TabPrint *>(this)->switch_excluder(evt.GetInt());
switch_excluder(evt.GetInt());
reload_config();
update_changed_ui();
});
m_main_sizer->Add(m_extruder_switch, 0, wxALIGN_CENTER | wxTOP, m_em_unit);
}
#endif
if (dynamic_cast<TabFilament *>(this)) {
} else if (dynamic_cast<TabFilament *>(this)) {
m_variant_combo = new MultiSwitchButton(panel);
m_variant_combo->Bind(wxCUSTOMEVT_MULTISWITCH_SELECTION, [this](auto &evt) {
evt.Skip();
@@ -6491,7 +6486,7 @@ bool Tab::tree_sel_change_delayed(wxCommandEvent& event)
m_active_page = page;
if (m_extruder_switch) {
m_main_sizer->Show(m_extruder_switch, !m_active_page->m_opt_id_map.empty());
m_main_sizer->Show(m_extruder_switch, m_extruder_switch->IsEnabled() && !m_active_page->m_opt_id_map.empty() && !m_active_page->title().StartsWith("Extruder"));
GetParent()->Layout();
} else if (m_variant_combo) {
m_main_sizer->Show(m_variant_combo, m_variant_combo->IsEnabled() && !m_active_page->m_opt_id_map.empty());