mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 04:37:52 -06:00
To OptionsGroup added "reload_config" to reload configurations after changes in any fields & "get_config_value" to get current option value from config.
In Field extended "set_value" to Choice. In PrintConfig added default_value to "post_process".
This commit is contained in:
parent
16458e070a
commit
59432d50ff
8 changed files with 168 additions and 12 deletions
|
@ -105,7 +105,7 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle)
|
|||
// Possible %params keys: no_controller
|
||||
build();
|
||||
rebuild_page_tree();
|
||||
// _update();
|
||||
update();
|
||||
}
|
||||
|
||||
PageShp Tab::add_options_page(wxString title, std::string icon, bool is_extruder_pages/* = false*/)
|
||||
|
@ -186,11 +186,19 @@ void Tab::load_config(DynamicPrintConfig config)
|
|||
if (modified) {
|
||||
update_dirty();
|
||||
//# Initialize UI components with the config values.
|
||||
// _reload_config();
|
||||
reload_config();
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
// Reload current $self->{config} (aka $self->{presets}->edited_preset->config) into the UI fields.
|
||||
void Tab::reload_config(){
|
||||
Freeze();
|
||||
for (auto page : m_pages)
|
||||
page->reload_config();
|
||||
Thaw();
|
||||
}
|
||||
|
||||
void Tab::load_key_value(std::string opt_key, std::vector<std::string> value)
|
||||
{
|
||||
// # To be called by custom widgets, load a value into a config,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue