diff --git a/resources/ui_layout/default/freq_fff.ui b/resources/ui_layout/default/freq_fff.ui index fcf53c32c19..d80283f490e 100644 --- a/resources/ui_layout/default/freq_fff.ui +++ b/resources/ui_layout/default/freq_fff.ui @@ -1,5 +1,5 @@ #logs -page:print: +page:Frequent settings: group:freq_settings_event:no_title:no_search: line: setting:simple:script:enum$none$None$bp$Support on build plate only$se$For support enforcers only$ev$Everywhere:depends$support_material$support_material_auto$support_material_buildplate_only:label$Supports:tooltip$Select what kind of support do you need:full_width:s_support_fff diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 21553c2e2aa..30cc9c4c2ab 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1154,7 +1154,7 @@ void Sidebar::jump_to_option(size_t selected) } } - wxGetApp().get_tab(opt.type)->activate_option(opt.opt_key_with_idx(), boost::nowide::narrow(opt.category)); + wxGetApp().get_tab(opt.type, false)->activate_option(opt.opt_key_with_idx(), boost::nowide::narrow(opt.category)); // Switch to the Settings NotePad // wxGetApp().mainframe->select_tab(MainFrame::ETabType::LastSettings); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 623e3a47c2e..360dfdabf25 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1507,6 +1507,11 @@ void Tab::activate_option(const std::string& opt_key, const wxString& category) m_highlighter.init(get_custom_ctrl_with_blinking_ptr(opt_key)); } +void TabFrequent::activate_option(const std::string &opt_key, const wxString &category){ + wxGetApp().plater()->collapse_sidebar(false); + wxGetApp().mainframe->select_tab(MainFrame::ETabType::Plater3D); +} + void Tab::cache_config_diff(const std::vector& selected_options) { m_cache_config.apply_only(m_presets->get_edited_preset().config, selected_options); diff --git a/src/slic3r/GUI/Tab.hpp b/src/slic3r/GUI/Tab.hpp index 8fb4c71250c..10bd168c40a 100644 --- a/src/slic3r/GUI/Tab.hpp +++ b/src/slic3r/GUI/Tab.hpp @@ -475,7 +475,7 @@ class Tab: public wxPanel void on_value_change(const std::string& opt_key, const boost::any& value); void update_wiping_button_visibility(); - void activate_option(const std::string& opt_key, const wxString& category); + virtual void activate_option(const std::string& opt_key, const wxString& category); void cache_config_diff(const std::vector& selected_options); void apply_config_from_cache(); @@ -524,6 +524,7 @@ class TabFrequent : public Tab PrinterTechnology get_printer_technology() const override { return (m_type & Preset::Type::TYPE_TECHNOLOGY) == Preset::Type::TYPE_FFF ? PrinterTechnology::ptFFF : (m_type & Preset::Type::TYPE_TECHNOLOGY) == Preset::Type::TYPE_SLA ? PrinterTechnology::ptSLA : PrinterTechnology::ptAny; } + virtual void activate_option(const std::string& opt_key, const wxString& category) override; }; class TabPrint : public Tab