Fix stale plate membership during plate grid rearrangement (#14850)

This commit is contained in:
Kiss Lorand
2026-07-26 00:08:12 +03:00
committed by GitHub
parent a62fb17e03
commit fc5aec425e

View File

@@ -4552,6 +4552,9 @@ int PartPlateList::create_plate(bool adjust_position)
return -1;
int cols = compute_colum_count(new_index + 1);
int old_cols = compute_colum_count(new_index);
// Orca: Rebuild plate membership before moving instances during a grid reflow.
if (adjust_position && old_cols != cols)
reload_all_objects();
origin = compute_origin(new_index, cols);
plate = new PartPlate(this, origin, m_plate_width, m_plate_depth, m_plate_height, m_plater, m_model, true, printer_technology);
@@ -5041,6 +5044,9 @@ int PartPlateList::move_plate_to_index(int old_index, int new_index)
return -1;
}
// Orca: Rebuild plate membership before moving the plates.
reload_all_objects();
if (old_index < new_index)
{
delta = 1;