mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-05 17:17:42 +00:00
Sort network plug-in versions newest first and mark only the loaded build
Discovered builds were inserted positionally behind the whitelist entry they anchored to, so an OTA-installed 02.08.01.53 listed below 02.08.01.52. The list is now built by appending and sorting once, which also drops the per-entry insertion scans. "(installed)" tested whether the library was present on disk, so it marked every version ever selected - switching leaves the previous library in place. The flag is now is_loaded, resolved against the plug-in actually loaded, and the two combo populators share one label helper.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "Widgets/RadioGroup.hpp"
|
||||
#include "slic3r/Utils/bambu_networking.hpp"
|
||||
#include "slic3r/Utils/NetworkAgent.hpp"
|
||||
#include "NetworkPluginDialog.hpp"
|
||||
#include "DownloadProgressDialog.hpp"
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
@@ -1262,23 +1263,7 @@ wxBoxSizer *PreferencesDialog::create_item_network_plugin_version(wxString title
|
||||
|
||||
for (size_t i = 0; i < m_available_versions.size(); i++) {
|
||||
const auto& ver = m_available_versions[i];
|
||||
wxString label;
|
||||
|
||||
if (!ver.suffix.empty()) {
|
||||
label = wxString::FromUTF8("\xE2\x94\x94 ") + wxString::FromUTF8(ver.display_name);
|
||||
} else {
|
||||
label = wxString::FromUTF8(ver.display_name);
|
||||
}
|
||||
|
||||
// "(Latest)" marks the highest listed version; "(installed)" marks versions
|
||||
// whose library is already on disk. One entry can carry both.
|
||||
if (ver.is_latest) {
|
||||
label += " " + _L("(Latest)");
|
||||
}
|
||||
if (ver.is_installed) {
|
||||
label += " " + _L("(installed)");
|
||||
}
|
||||
m_network_version_combo->Append(label);
|
||||
m_network_version_combo->Append(network_version_label(ver));
|
||||
if (current_version == ver.version) {
|
||||
current_selection = i;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user