mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
ENH:adjust UI in AmsMapingPopup
jira: none Change-Id: Ib2e7e642d7a1700abb92eca2546614b2fd7d2bd4 (cherry picked from commit 5c8d62097384836a1a6d496983734c4e3220baaa)
This commit is contained in:
@@ -494,8 +494,11 @@ bool 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())
|
||||
auto name = tray.opt_string("tray_name", 0u);
|
||||
if (filament_id.empty()) {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": %1% 's filament_id is empty.") % name;
|
||||
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()) {
|
||||
@@ -512,7 +515,6 @@ bool PresetComboBox::add_ams_filaments(std::string selected, bool alias_name)
|
||||
}
|
||||
const_cast<Preset&>(*iter).is_visible = true;
|
||||
auto color = tray.opt_string("filament_colour", 0u);
|
||||
auto name = tray.opt_string("tray_name", 0u);
|
||||
wxBitmap bmp(*get_extruder_color_icon(color, name, icon_width, 16));
|
||||
auto text = get_preset_name(*iter);
|
||||
int item_id = Append(text, bmp.ConvertToImage(), &m_first_ams_filament + entry.first);
|
||||
|
||||
Reference in New Issue
Block a user