mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-12 08:14:26 +00:00
Some code refactoring follow-up https://github.com/prusa3d/PrusaSlicer/commit/33aa6be7b7f3d8b81d6b948f9bd6841db10b61cf and https://github.com/prusa3d/PrusaSlicer/commit/92b1302a082b76de6693799ccdb7922617f21c50
This commit is contained in:
@@ -548,18 +548,10 @@ void MainFrame::init_tabpanel()
|
||||
m_tabpanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGING, [this](wxBookCtrlEvent& evt) {
|
||||
wxWindow* panel = m_tabpanel->GetCurrentPage();
|
||||
if (panel != nullptr) {
|
||||
TabPrinter* printer_tab = dynamic_cast<TabPrinter*>(panel);
|
||||
if (printer_tab != nullptr) {
|
||||
if (!printer_tab->validate_custom_gcodes())
|
||||
Tab* tab = dynamic_cast<Tab*>(panel);
|
||||
if (tab && (tab->type() == Preset::TYPE_FILAMENT || tab->type() == Preset::TYPE_PRINTER))
|
||||
if (!tab->validate_custom_gcodes())
|
||||
evt.Veto();
|
||||
return;
|
||||
}
|
||||
TabFilament* filament_tab = dynamic_cast<TabFilament*>(panel);
|
||||
if (filament_tab != nullptr) {
|
||||
if (!filament_tab->validate_custom_gcodes())
|
||||
evt.Veto();
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
#endif // ENABLE_VALIDATE_CUSTOM_GCODE
|
||||
|
||||
Reference in New Issue
Block a user