diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 74ea52c643..6c24acd665 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -554,6 +554,13 @@ ConfigMenuIDs GUI_App::get_view_mode() mode == "simple" ? ConfigMenuModeSimple : ConfigMenuModeAdvanced; } +ConfigOptionMode GUI_App::get_opt_mode() { + const ConfigMenuIDs mode = wxGetApp().get_view_mode(); + + return mode == ConfigMenuModeSimple ? comSimple : + mode == ConfigMenuModeExpert ? comExpert : comAdvanced; +} + // Update view mode according to selected menu void GUI_App::update_mode() { @@ -568,10 +575,8 @@ void GUI_App::update_mode() sidebar().Layout(); - ConfigOptionMode opt_mode = mode == ConfigMenuModeSimple ? comSimple : - mode == ConfigMenuModeExpert ? comExpert : comAdvanced; for (auto tab : tabs_list) - tab->update_visibility(opt_mode); + tab->update_visibility(); plater()->update_object_menu(); } diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index bd64a3ac57..e388910d72 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -135,6 +135,7 @@ public: Tab* get_tab(Preset::Type type); ConfigMenuIDs get_view_mode(); + ConfigOptionMode get_opt_mode(); void update_mode(); void add_config_menu(wxMenuBar *menu); diff --git a/src/slic3r/GUI/KBShortcutsDialog.cpp b/src/slic3r/GUI/KBShortcutsDialog.cpp index 12929b2cc5..6ebb1ef669 100644 --- a/src/slic3r/GUI/KBShortcutsDialog.cpp +++ b/src/slic3r/GUI/KBShortcutsDialog.cpp @@ -99,7 +99,7 @@ void KBShortcutsDialog::fill_shortcuts() main_shortcuts.reserve(25); main_shortcuts.push_back(Shortcut(ctrl+"O" ,L("Open project STL/OBJ/AMF/3MF with config, delete bed"))); - main_shortcuts.push_back(Shortcut(ctrl+"I" ,L("Import STL//OBJ/AMF/3MF without config, keep bed"))); + main_shortcuts.push_back(Shortcut(ctrl+"I" ,L("Import STL/OBJ/AMF/3MF without config, keep bed"))); main_shortcuts.push_back(Shortcut(ctrl+"L" ,L("Load Config from .ini/amf/3mf/gcode"))); main_shortcuts.push_back(Shortcut(ctrl+"G" ,L("Export Gcode"))); main_shortcuts.push_back(Shortcut(ctrl+"S" ,L("Save project (3MF)"))); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index a4796778a5..ae17eed380 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -667,8 +667,9 @@ void Tab::reload_config() Thaw(); } -void Tab::update_visibility(ConfigOptionMode mode) +void Tab::update_visibility() { + const ConfigOptionMode mode = wxGetApp().get_opt_mode(); Freeze(); for (auto page : m_pages) @@ -1988,6 +1989,7 @@ PageShp TabPrinter::build_kinematics_page() def.type = coString; def.width = 150; def.gui_type = "legend"; + def.mode = comAdvanced; def.tooltip = L("Values in this column are for Full Power mode"); def.default_value = new ConfigOptionString{ L("Full Power") }; @@ -2345,12 +2347,15 @@ void Tab::load_current_preset() init_options_list(); update_changed_ui(); }); + update_page_tree_visibility(); } //Regerenerate content of the page tree. void Tab::rebuild_page_tree(bool tree_sel_change_event /*= false*/) { Freeze(); + update_visibility(); + // get label of the currently selected item const auto sel_item = m_treectrl->GetSelection(); const auto selected = sel_item ? m_treectrl->GetItemText(sel_item) : ""; @@ -2363,8 +2368,8 @@ void Tab::rebuild_page_tree(bool tree_sel_change_event /*= false*/) auto itemId = m_treectrl->AppendItem(rootItem, p->title(), p->iconID()); m_treectrl->SetItemTextColour(itemId, p->get_item_colour()); if (p->title() == selected) { - if (!(p->title() == _(L("Machine limits")) || p->title() == _(L("Single extruder MM setup")))) // These Pages have to be updated inside OnTreeSelChange - m_disable_tree_sel_changed_event = !tree_sel_change_event; +// if (!(p->title() == _(L("Machine limits")) || p->title() == _(L("Single extruder MM setup")))) // These Pages have to be updated inside OnTreeSelChange +// m_disable_tree_sel_changed_event = !tree_sel_change_event; m_treectrl->SelectItem(itemId); m_disable_tree_sel_changed_event = false; have_selection = 1; @@ -2924,14 +2929,15 @@ ConfigOptionsGroupShp Page::new_optgroup(const wxString& title, int noncommon_la auto extra_column = [](wxWindow* parent, const Line& line) { std::string bmp_name; - if (line.get_options().size() == 0) - bmp_name = "error.png"; + const std::vector