Don't keep a separate use_legacy_network which is error-prone. Always infer from installed plugin version. (OrcaSlicer/OrcaSlicer#14441)

This commit is contained in:
Noisyfox
2026-07-01 21:17:11 +08:00
parent ac79886c5c
commit 6b886b04f2
6 changed files with 18 additions and 25 deletions
+3 -3
View File
@@ -836,7 +836,7 @@ void PresetUpdater::priv::sync_plugins(std::string http_url, std::string plugin_
BOOST_LOG_TRIVIAL(info) << "non need to sync plugins for there is no plugins currently.";
return;
}
std::string curr_version = NetworkAgent::use_legacy_network ? BAMBU_NETWORK_AGENT_VERSION_LEGACY : get_latest_network_version();
std::string curr_version = GUI::wxGetApp().use_legacy_network_plugin() ? BAMBU_NETWORK_AGENT_VERSION_LEGACY : get_latest_network_version();
std::string using_version = curr_version.substr(0, 9) + "00";
std::string cached_version;
@@ -931,7 +931,7 @@ void PresetUpdater::priv::sync_plugins(std::string http_url, std::string plugin_
}
#if defined(__WINDOWS__)
if (GUI::wxGetApp().is_running_on_arm64() && !NetworkAgent::use_legacy_network) {
if (GUI::wxGetApp().is_running_on_arm64() && !GUI::wxGetApp().use_legacy_network_plugin()) {
//set to arm64 for plugins
std::map<std::string, std::string> current_headers = Slic3r::Http::get_extra_headers();
current_headers["X-BBL-OS-Type"] = "windows_arm";
@@ -951,7 +951,7 @@ void PresetUpdater::priv::sync_plugins(std::string http_url, std::string plugin_
BOOST_LOG_TRIVIAL(warning) << format("[Orca Updater] sync_plugins: %1%", e.what());
}
#if defined(__WINDOWS__)
if (GUI::wxGetApp().is_running_on_arm64() && !NetworkAgent::use_legacy_network) {
if (GUI::wxGetApp().is_running_on_arm64() && !GUI::wxGetApp().use_legacy_network_plugin()) {
//set back
std::map<std::string, std::string> current_headers = Slic3r::Http::get_extra_headers();
current_headers["X-BBL-OS-Type"] = "windows";