mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-07 22:14:00 -06:00
Fix the extruder override logic. All role-based extruder options now default to 0, meaning no override is defined and the default (inherited) extruder is used. The default extruder option does not use the shortcut logic anymore (it was thus moved to be a CLI-specific logic)
This commit is contained in:
parent
2e6213fea6
commit
0ff33f47f1
8 changed files with 147 additions and 83 deletions
|
@ -22,6 +22,8 @@ class ConfigOption {
|
|||
virtual ~ConfigOption() {};
|
||||
virtual std::string serialize() const = 0;
|
||||
virtual bool deserialize(std::string str) = 0;
|
||||
virtual int getInt() const { return 0; };
|
||||
virtual void setInt(int val) {};
|
||||
};
|
||||
|
||||
template <class T>
|
||||
|
@ -91,6 +93,8 @@ class ConfigOptionInt : public ConfigOption
|
|||
ConfigOptionInt() : value(0) {};
|
||||
|
||||
operator int() const { return this->value; };
|
||||
int getInt() const { return this->value; };
|
||||
void setInt(int val) { this->value = val; };
|
||||
|
||||
std::string serialize() const {
|
||||
std::ostringstream ss;
|
||||
|
@ -499,11 +503,6 @@ class StaticConfig : public ConfigBase
|
|||
{
|
||||
public:
|
||||
void keys(t_config_option_keys *keys) const;
|
||||
void apply(const ConfigBase &other, bool ignore_nonexistent = false) {
|
||||
// this proxy appears to be needed otherwise the inherited signature couldn't be found from .xsp
|
||||
ConfigBase::apply(other, ignore_nonexistent);
|
||||
};
|
||||
void apply(const DynamicConfig &other, bool ignore_nonexistent = false);
|
||||
virtual ConfigOption* option(const t_config_option_key opt_key, bool create = false) = 0;
|
||||
const ConfigOption* option(const t_config_option_key opt_key) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue