From 908c48ae6a1950eec1cf76840a06ee84e83ea155 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Mon, 1 Mar 2021 13:03:43 +0100 Subject: Follow-up of 86d7e1fb907d9841a1d0cf516415fea84e8b5280 -> Fixed update after switching tab after editing custom g-code in settings tabs --- src/slic3r/GUI/MainFrame.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/slic3r/GUI/MainFrame.cpp') 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(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 -- cgit v1.2.3