mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX:got the wrong name of the selected filament
jira: none Change-Id: I476bd1dfb995a0868161184c0c5782e1cae4dde3 (cherry picked from commit 31a7f19b983374ccf6e1b57de8fb635ef7e24184)
This commit is contained in:
@@ -230,8 +230,10 @@ int PresetComboBox::update_ams_color()
|
||||
int idx = selected_ams_filament();
|
||||
std::string color;
|
||||
if (idx < 0) {
|
||||
auto *preset = m_collection->find_preset(Preset::remove_suffix_modified(GetLabel().ToUTF8().data()));
|
||||
if (preset) color = preset->config.opt_string("default_filament_colour", 0u);
|
||||
auto name = Preset::remove_suffix_modified(GetValue().ToUTF8().data());
|
||||
auto *preset = m_collection->find_preset(name);
|
||||
if (preset)
|
||||
color = preset->config.opt_string("default_filament_colour", 0u);
|
||||
if (color.empty()) return -1;
|
||||
} else {
|
||||
auto &ams_list = wxGetApp().preset_bundle->filament_ams_list;
|
||||
@@ -911,7 +913,7 @@ void PlaterPresetComboBox::OnSelect(wxCommandEvent &evt)
|
||||
wxTheApp->CallAfter([sp]() { run_wizard(sp); });
|
||||
//}
|
||||
return;
|
||||
} else if (marker == LABEL_ITEM_PHYSICAL_PRINTER || m_last_selected != selected_item || m_collection->current_is_dirty()) {
|
||||
} else if (marker == LABEL_ITEM_PHYSICAL_PRINTER || selected_item >= 0 || m_collection->current_is_dirty()) {
|
||||
m_last_selected = selected_item;
|
||||
if (m_type == Preset::TYPE_FILAMENT)
|
||||
update_ams_color();
|
||||
|
||||
Reference in New Issue
Block a user