mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 08:11:11 -06:00
Automatically disable retract_layer_change when using spiral_vase
This commit is contained in:
parent
2ac40f9547
commit
98b8936ee2
5 changed files with 27 additions and 7 deletions
|
|
@ -320,6 +320,15 @@ DynamicConfig::option(const t_config_option_key opt_key, bool create) {
|
|||
return this->options[opt_key];
|
||||
}
|
||||
|
||||
template<class T>
|
||||
T*
|
||||
DynamicConfig::opt(const t_config_option_key opt_key, bool create) {
|
||||
return dynamic_cast<T*>(this->option(opt_key, create));
|
||||
}
|
||||
template ConfigOptionInt* DynamicConfig::opt<ConfigOptionInt>(const t_config_option_key opt_key, bool create);
|
||||
template ConfigOptionBool* DynamicConfig::opt<ConfigOptionBool>(const t_config_option_key opt_key, bool create);
|
||||
template ConfigOptionBools* DynamicConfig::opt<ConfigOptionBools>(const t_config_option_key opt_key, bool create);
|
||||
|
||||
const ConfigOption*
|
||||
DynamicConfig::option(const t_config_option_key opt_key) const {
|
||||
return const_cast<DynamicConfig*>(this)->option(opt_key, false);
|
||||
|
|
|
|||
|
|
@ -491,6 +491,7 @@ class DynamicConfig : public ConfigBase
|
|||
DynamicConfig& operator= (DynamicConfig other);
|
||||
void swap(DynamicConfig &other);
|
||||
~DynamicConfig();
|
||||
template<class T> T* opt(const t_config_option_key opt_key, bool create = false);
|
||||
ConfigOption* option(const t_config_option_key opt_key, bool create = false);
|
||||
const ConfigOption* option(const t_config_option_key opt_key) const;
|
||||
void keys(t_config_option_keys *keys) const;
|
||||
|
|
|
|||
|
|
@ -985,6 +985,13 @@ class DynamicPrintConfig : public DynamicConfig
|
|||
if (!this->has("support_material_interface_extruder"))
|
||||
this->option("support_material_interface_extruder", true)->setInt(extruder);
|
||||
}
|
||||
if (this->has("spiral_vase") && this->opt<ConfigOptionBool>("spiral_vase", true)->value) {
|
||||
{
|
||||
// this should be actually done only on the spiral layers instead of all
|
||||
ConfigOptionBools* opt = this->opt<ConfigOptionBools>("retract_layer_change", true);
|
||||
opt->values.assign(opt->values.size(), false); // set all values to false
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue