Skip to content

Commit

Permalink
Fix search frequent setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Jun 4, 2024
1 parent 169257b commit 9f87f80
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resources/ui_layout/default/freq_fff.ui
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions src/slic3r/GUI/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string>& selected_options)
{
m_cache_config.apply_only(m_presets->get_edited_preset().config, selected_options);
Expand Down
3 changes: 2 additions & 1 deletion src/slic3r/GUI/Tab.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string>& selected_options);
void apply_config_from_cache();

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9f87f80

Please sign in to comment.