Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenricoturri1966 <enricoturri@seznam.cz>2021-03-01 15:03:43 +0300
committerenricoturri1966 <enricoturri@seznam.cz>2021-03-01 15:03:43 +0300
commit908c48ae6a1950eec1cf76840a06ee84e83ea155 (patch)
treee25a000ef7a34852ec6aebdfb0edf8bb66bc5494 /src/slic3r/GUI/MainFrame.cpp
parent224f3e506c9db3d2de9e2e441ee4443de2bab964 (diff)
Follow-up of 86d7e1fb907d9841a1d0cf516415fea84e8b5280 -> Fixed update after switching tab after editing custom g-code in settings tabs
Diffstat (limited to 'src/slic3r/GUI/MainFrame.cpp')
-rw-r--r--src/slic3r/GUI/MainFrame.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp
index 91357ff6c..6b0dd1ad5 100644
--- a/src/slic3r/GUI/MainFrame.cpp
+++ b/src/slic3r/GUI/MainFrame.cpp
@@ -549,9 +549,8 @@ void MainFrame::init_tabpanel()
wxWindow* panel = m_tabpanel->GetCurrentPage();
if (panel != nullptr) {
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();
+ if (tab != nullptr && !tab->validate_custom_gcodes())
+ evt.Veto();
}
});
#endif // ENABLE_VALIDATE_CUSTOM_GCODE