FIX:together update plate_trans and unselected_plate_trans

jira: STUDIO-7814
Change-Id: I0dc2da305b5a4c83b8f27bd07478b2f8fddebac0
(cherry picked from commit 625336509444cb5ea7640d64b260ede738887941)
This commit is contained in:
zhou.xu 2024-08-07 12:29:01 +08:00 committed by Lane.Wei
parent c03aa5ffeb
commit 65cfb9ad13
1 changed files with 7 additions and 2 deletions

View File

@ -2845,9 +2845,14 @@ void PartPlateList::update_plate_trans(int count)
Vec3d plate_origin= Vec3d(pos.x(), pos.y(), 0);
m_plate_trans[i].set_offset(plate_origin);
}
update_unselected_plate_trans(count);
}
void PartPlateList::update_unselected_plate_trans(int count) {
if (count == 1) {
m_unselected_plate_trans.clear();
return;
}
m_update_unselected_plate_mats_vbo = true;
m_unselected_plate_trans.resize(count - 1);
int cols = compute_colum_count(count);
@ -3806,7 +3811,7 @@ int PartPlateList::select_plate(int index)
m_current_plate = index;
m_plate_list[m_current_plate]->set_selected();
update_unselected_plate_trans(get_plate_count());
update_plate_trans(get_plate_count());
//BBS
if(m_model)
m_model->curr_plate_index = index;
@ -4965,7 +4970,7 @@ bool PartPlateList::set_shapes(const Pointfs& shape, const Pointfs& exclude_area
update_logo_texture_filename(texture_filename);
update_plate_trans(get_plate_count());
update_unselected_plate_trans(get_plate_count());
{ // prepare render data
ExPolygon poly;
generate_print_polygon(poly);