mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
ConfigWizard: Fix: Snapshot not being taken on user-requested Wizard run
If the user launched Wizard from the menu and checked the reset checkbox, snapshot was not taken in case no new bundles were to be installed from resources (ie. most of the time). Snapshot is now taken as appropriate.
This commit is contained in:
parent
7706a5be3e
commit
1fc05bbf00
2 changed files with 38 additions and 5 deletions
|
@ -35,6 +35,10 @@ using Slic3r::GUI::Config::Snapshot;
|
|||
using Slic3r::GUI::Config::SnapshotDB;
|
||||
|
||||
|
||||
|
||||
// FIXME: Incompat bundle resolution doesn't deal with inherited user presets
|
||||
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
||||
|
@ -624,11 +628,17 @@ PresetUpdater::UpdateResult PresetUpdater::config_update() const
|
|||
const auto res = dlg.ShowModal();
|
||||
if (res == wxID_REPLACE) {
|
||||
BOOST_LOG_TRIVIAL(info) << "User wants to re-configure...";
|
||||
|
||||
// This effectively removes the incompatible bundles:
|
||||
// (snapshot is taken beforehand)
|
||||
p->perform_updates(std::move(updates));
|
||||
|
||||
GUI::ConfigWizard wizard(nullptr, GUI::ConfigWizard::RR_DATA_INCOMPAT);
|
||||
|
||||
if (! wizard.run(GUI::wxGetApp().preset_bundle, this)) {
|
||||
return R_INCOMPAT_EXIT;
|
||||
}
|
||||
|
||||
GUI::wxGetApp().load_current_presets();
|
||||
return R_INCOMPAT_CONFIGURED;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue