mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
ENH: [STUDIO-1667] show ams tray name in color icon
Change-Id: Id98de7c8d08a337f32559b54acc0f8613aa2cf65
This commit is contained in:
parent
31ff48ccca
commit
91d36e0562
2 changed files with 11 additions and 2 deletions
|
@ -1360,9 +1360,11 @@ void Sidebar::load_ams_list(std::map<std::string, Ams *> const &list)
|
|||
if (tray.second->setting_id.empty()) continue;
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__
|
||||
<< boost::format(": ams %1% tray %2% id %3% color %4%") % ams.first % tray.first % tray.second->setting_id % tray.second->color;
|
||||
char n = ams.first.front() - '0' + 'A';
|
||||
DynamicPrintConfig ams;
|
||||
ams.set_key_value("filament_id", new ConfigOptionStrings{tray.second->setting_id});
|
||||
ams.set_key_value("filament_type", new ConfigOptionStrings{tray.second->type});
|
||||
ams.set_key_value("tray_name", new ConfigOptionStrings{std::string(1, n) + tray.first});
|
||||
ams.set_key_value("filament_colour", new ConfigOptionStrings{"#" + tray.second->color.substr(0, 6)});
|
||||
filament_ams_list.emplace_back(std::move(ams));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue