ENH: clean codes about device

JIRA: [STUDIO-13609]
Change-Id: I591de7033360b9570600006cfbce2148a8d031d5
(cherry picked from commit e9c774be8f4c89b8dafa14ef56913612fb68bd0c)
This commit is contained in:
xin.zhang
2025-08-01 17:34:35 +08:00
committed by Noisyfox
parent e17c8bfb80
commit 4a787f6ff8
115 changed files with 7238 additions and 5492 deletions

View File

@@ -45,6 +45,8 @@
#include "FilamentPickerDialog.hpp"
#include "wxExtensions.hpp"
#include "DeviceCore/DevManager.h"
// A workaround for a set of issues related to text fitting into gtk widgets:
#if defined(__WXGTK20__) || defined(__WXGTK3__)
#include <glib-2.0/glib-object.h>
@@ -469,7 +471,7 @@ void PresetComboBox::add_connected_printers(std::string selected, bool alias_nam
printer_preset->is_visible = true;
auto printer_model = printer_preset->config.opt_string("printer_model");
boost::replace_all(printer_model, "Bambu Lab ", "");
auto text = iter->second->dev_name + " (" + printer_model + ")";
auto text = iter->second->get_dev_name() + " (" + printer_model + ")";
int item_id = Append(from_u8(text), wxNullBitmap, &m_first_printer_idx + std::distance(machine_list.begin(), iter));
validate_selection(m_selected_dev_id == iter->first);
}