mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
FIX:update SyncAmsInfoDialog
jira: none Change-Id: I8c34d47e799c56e2b1887794dc8a7bfaf8904d77 (cherry picked from commit e06aed7cbf144cdd77f9b7caa160c1c7f7941794)
This commit is contained in:
@@ -491,7 +491,8 @@ void PresetComboBox::add_ams_filaments(std::string selected, bool alias_name)
|
||||
}
|
||||
auto & tray = entry.second;
|
||||
std::string filament_id = tray.opt_string("filament_id", 0u);
|
||||
if (filament_id.empty()) continue;
|
||||
if (filament_id.empty())
|
||||
continue;
|
||||
auto iter = std::find_if(filaments.begin(), filaments.end(),
|
||||
[&filament_id, this](auto &f) { return f.is_compatible && m_collection->get_preset_base(f) == &f && f.filament_id == filament_id; });
|
||||
if (iter == filaments.end()) {
|
||||
@@ -511,6 +512,7 @@ void PresetComboBox::add_ams_filaments(std::string selected, bool alias_name)
|
||||
auto name = tray.opt_string("tray_name", 0u);
|
||||
wxBitmap bmp(*get_extruder_color_icon(color, name, icon_width, 16));
|
||||
int item_id = Append(get_preset_name(*iter), bmp.ConvertToImage(), &m_first_ams_filament + entry.first);
|
||||
SetFlag(GetCount() - 1, (int) FilamentAMSType::FROM_AMS);
|
||||
//validate_selection(id->value == selected); // can not select
|
||||
}
|
||||
m_last_ams_filament = GetCount();
|
||||
|
||||
Reference in New Issue
Block a user