mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-24 13:25:07 -07:00
ENH:add "sync filaments status" logic
jira: none Change-Id: I7a74641e6d8e1d1d713d4d97af370a8c0a87f154 (cherry picked from commit abfa7261625dfd90ad276baf9afd66a3368303f1)
This commit is contained in:
parent
ecb94e119c
commit
b2856b44b0
5 changed files with 90 additions and 40 deletions
|
|
@ -4006,13 +4006,20 @@ void SyncAmsInfoDialog::clone_thumbnail_data(bool allow_clone_ams_color)
|
|||
while (iter != m_materialList.end()) {
|
||||
int id = iter->first;
|
||||
Material *item = iter->second;
|
||||
auto m = item->item;
|
||||
m_preview_colors_in_thumbnail[id] = m->m_material_coloul;
|
||||
if (item->id < m_cur_colors_in_thumbnail.size()) {
|
||||
m_cur_colors_in_thumbnail[item->id] = m->m_ams_coloul;
|
||||
} else { // exist empty or unrecognized type ams in machine
|
||||
m_cur_colors_in_thumbnail.resize(item->id + 1);
|
||||
m_cur_colors_in_thumbnail[item->id] = m->m_ams_coloul;
|
||||
if (item) {
|
||||
auto m = item->item;
|
||||
if (m) {
|
||||
m_preview_colors_in_thumbnail[id] = m->m_material_coloul;
|
||||
if (item->id < m_cur_colors_in_thumbnail.size()) {
|
||||
m_cur_colors_in_thumbnail[item->id] = m->m_ams_coloul;
|
||||
} else { // exist empty or unrecognized type ams in machine
|
||||
m_cur_colors_in_thumbnail.resize(item->id + 1);
|
||||
m_cur_colors_in_thumbnail[item->id] = m->m_ams_coloul;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
BOOST_LOG_TRIVIAL(error) << "check error:SyncAmsInfoDialog::clone_thumbnail_data:item is nullptr";
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue