Add material print speed parameter for sla printers except sl1

This commit is contained in:
tamasmeszaros 2021-11-10 13:44:47 +01:00
parent 67373ca722
commit a7260e7257
6 changed files with 35 additions and 1 deletions

View file

@ -4239,6 +4239,11 @@ void TabSLAMaterial::build()
optgroup->append_single_option_line(option);
build_preset_description_line(optgroup.get());
page = add_options_page(L("Material printing profile"), "note.png");
optgroup = page->new_optgroup(L("Material printing profile"));
option = optgroup->get_option("material_print_speed");
optgroup->append_single_option_line(option);
}
// Reload current config (aka presets->edited_preset->config) into the UI fields.
@ -4249,6 +4254,13 @@ void TabSLAMaterial::reload_config()
Tab::reload_config();
}
void TabSLAMaterial::toggle_options()
{
const Preset &current_printer = wxGetApp().preset_bundle->printers.get_edited_preset();
std::string model = current_printer.config.opt_string("printer_model");
m_config_manipulation.toggle_field("material_print_speed", model != "SL1");
}
void TabSLAMaterial::update()
{
if (m_preset_bundle->printers.get_selected_preset().printer_technology() == ptFFF)

View file

@ -480,7 +480,7 @@ public:
void build() override;
void reload_config() override;
void toggle_options() override {};
void toggle_options() override;
void update() override;
void init_options_list() override;
bool supports_printer_technology(const PrinterTechnology tech) const override { return tech == ptSLA; }