Windows specific: Only start the 3rd party updater application

if enabled in PrusaSlicer preferences.
This commit is contained in:
Vojtech Bubnik 2021-12-03 09:26:44 +01:00
parent 45d9e6bddd
commit 50da39d30b
3 changed files with 10 additions and 2 deletions

View file

@ -779,8 +779,8 @@ void GUI_App::post_init()
show_send_system_info_dialog_if_needed(); show_send_system_info_dialog_if_needed();
} }
#ifdef _WIN32 #ifdef _WIN32
// Run external updater on Windows. // Run external updater on Windows if version check is enabled.
if (! run_updater_win()) if (this->preset_updater->version_check_enabled() && ! run_updater_win())
// "prusaslicer-updater.exe" was not started, run our own update check. // "prusaslicer-updater.exe" was not started, run our own update check.
#endif // _WIN32 #endif // _WIN32
this->preset_updater->slic3r_update_notify(); this->preset_updater->slic3r_update_notify();

View file

@ -954,4 +954,9 @@ void PresetUpdater::on_update_notification_confirm()
} }
} }
bool PresetUpdater::version_check_enabled() const
{
return p->enabled_version_check;
}
} }

View file

@ -57,6 +57,9 @@ public:
bool install_bundles_rsrc(std::vector<std::string> bundles, bool snapshot = true) const; bool install_bundles_rsrc(std::vector<std::string> bundles, bool snapshot = true) const;
void on_update_notification_confirm(); void on_update_notification_confirm();
bool version_check_enabled() const;
private: private:
struct priv; struct priv;
std::unique_ptr<priv> p; std::unique_ptr<priv> p;