Fix double wizard on incompatible bundle, for real this time

This commit is contained in:
Vojtech Kral 2019-05-17 17:35:15 +02:00
parent b205daa437
commit eebb9e3fe7
3 changed files with 27 additions and 10 deletions

View file

@ -185,8 +185,11 @@ bool GUI_App::on_init_inner()
app_conf_exists = app_config->exists();
// load settings
if (app_config->exists())
app_conf_exists = app_config->exists();
if (app_conf_exists) {
app_config->load();
}
app_config->set("version", SLIC3R_VERSION);
app_config->save();
@ -249,9 +252,13 @@ bool GUI_App::on_init_inner()
if (once) {
once = false;
PresetUpdater::UpdateResult updater_result;
try {
if (!preset_updater->config_update()) {
updater_result = preset_updater->config_update();
if (updater_result == PresetUpdater::R_INCOMPAT_EXIT) {
mainframe->Close();
} else if (updater_result == PresetUpdater::R_INCOMPAT_CONFIGURED) {
app_conf_exists = true;
}
} catch (const std::exception &ex) {
show_error(nullptr, from_u8(ex.what()));