mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-29 16:50:18 -07:00
New erase() method for DynamicConfig objects
This commit is contained in:
@@ -289,6 +289,11 @@ DynamicConfig::keys(t_config_option_keys *keys) {
|
||||
keys->push_back(it->first);
|
||||
}
|
||||
|
||||
void
|
||||
DynamicConfig::erase(const t_config_option_key opt_key) {
|
||||
this->options.erase(opt_key);
|
||||
}
|
||||
|
||||
void
|
||||
StaticConfig::keys(t_config_option_keys *keys) {
|
||||
for (t_optiondef_map::const_iterator it = this->def->begin(); it != this->def->end(); ++it) {
|
||||
|
||||
@@ -430,6 +430,7 @@ class DynamicConfig : public ConfigBase
|
||||
~DynamicConfig();
|
||||
ConfigOption* option(const t_config_option_key opt_key, bool create = false);
|
||||
void keys(t_config_option_keys *keys);
|
||||
void erase(const t_config_option_key opt_key);
|
||||
|
||||
private:
|
||||
DynamicConfig(const DynamicConfig& other); // we disable this by making it private and unimplemented
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
%code{% THIS->apply(*other, true); %};
|
||||
std::vector<std::string> get_keys()
|
||||
%code{% THIS->keys(&RETVAL); %};
|
||||
void erase(t_config_option_key opt_key);
|
||||
};
|
||||
|
||||
%name{Slic3r::Config::Print} class PrintConfig {
|
||||
|
||||
Reference in New Issue
Block a user