mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-04 18:58:00 -05:00
Enable vendor profile updates by default, except in stealth mode (#17289)
* always enable OTA * Stop vendor profile update checks in stealth mode * Keep vendor profile updates off in dev builds
This commit is contained in:
1 parent
f96bbe8db1
commit
637d7a9ce6
2 files changed
+6
-6
No files matched your search
@@ -749,11 +749,6 @@ void AppConfig::set_defaults()
|
||||
set_bool("use_printer_agents", false);
|
||||
}
|
||||
|
||||
if (get("enable_ota").empty())
|
||||
{
|
||||
set_bool("enable_ota", false);
|
||||
}
|
||||
|
||||
// Remove legacy window positions/sizes
|
||||
erase("app", "main_frame_maximized");
|
||||
erase("app", "main_frame_pos");
|
||||
|
||||
@@ -303,7 +303,9 @@ void PresetUpdater::priv::set_download_prefs(AppConfig *app_config)
|
||||
version_check_url = app_config->version_check_url();
|
||||
|
||||
auto profile_update_url = app_config->profile_update_url();
|
||||
if (!profile_update_url.empty() && app_config->get_bool("enable_ota"))
|
||||
// Dev builds keep the profiles from their own source tree; an over-the-air bundle would replace them.
|
||||
const bool dev_build = boost::algorithm::icontains(std::string(SoftFever_VERSION), "dev");
|
||||
if (!profile_update_url.empty() && !dev_build)
|
||||
enabled_config_update = true;
|
||||
else
|
||||
enabled_config_update = false;
|
||||
@@ -1383,6 +1385,9 @@ void PresetUpdater::check_vendor_update(const std::string& vendor_id)
|
||||
{
|
||||
if (!p->enabled_config_update) return;
|
||||
if (vendor_id.empty()) return;
|
||||
// Stealth mode can be switched off mid-session, so it is checked before the vendor is marked
|
||||
// as checked: the next printer change after that still queries the server.
|
||||
if (GUI::wxGetApp().app_config->get_stealth_mode()) return;
|
||||
|
||||
if (!p->checked_vendors.insert(vendor_id).second)
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user