PresetUpdater: Fix reloading of profiles after reconfigure and update
Fix #1060 Fix #985
This commit is contained in:
parent
1c58c3e153
commit
3e65b4410b
3 changed files with 2 additions and 3 deletions
|
@ -788,7 +788,6 @@ void ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
|
|||
app_config->set("version_check", page_update->version_check ? "1" : "0");
|
||||
app_config->set("preset_update", page_update->preset_update ? "1" : "0");
|
||||
app_config->reset_selections();
|
||||
// ^ TODO: replace with appropriate printer selection
|
||||
preset_bundle->load_presets(*app_config);
|
||||
} else {
|
||||
for (ConfigWizardPage *page = page_firmware; page != nullptr; page = page->page_next()) {
|
||||
|
|
|
@ -268,7 +268,7 @@ void PresetBundle::load_installed_printers(const AppConfig &config)
|
|||
}
|
||||
|
||||
// Load selections (current print, current filaments, current printer) from config.ini
|
||||
// This is done just once on application start up.
|
||||
// This is done on application start up or after updates are applied.
|
||||
void PresetBundle::load_selections(const AppConfig &config)
|
||||
{
|
||||
// Update visibility of presets based on application vendor / model / variant configuration.
|
||||
|
|
|
@ -570,6 +570,7 @@ bool PresetUpdater::config_update() const
|
|||
if (! wizard.run(GUI::get_preset_bundle(), this)) {
|
||||
return false;
|
||||
}
|
||||
GUI::load_current_presets();
|
||||
} else {
|
||||
BOOST_LOG_TRIVIAL(info) << "User wants to exit Slic3r, bye...";
|
||||
return false;
|
||||
|
@ -599,7 +600,6 @@ bool PresetUpdater::config_update() const
|
|||
|
||||
// Reload global configuration
|
||||
auto *app_config = GUI::get_app_config();
|
||||
app_config->reset_selections();
|
||||
GUI::get_preset_bundle()->load_presets(*app_config);
|
||||
GUI::load_current_presets();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue