mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 18:27:00 +00:00
Fix stale plate membership during plate grid rearrangement (#14850)
This commit is contained in:
@@ -4552,6 +4552,9 @@ int PartPlateList::create_plate(bool adjust_position)
|
|||||||
return -1;
|
return -1;
|
||||||
int cols = compute_colum_count(new_index + 1);
|
int cols = compute_colum_count(new_index + 1);
|
||||||
int old_cols = compute_colum_count(new_index);
|
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);
|
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);
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Orca: Rebuild plate membership before moving the plates.
|
||||||
|
reload_all_objects();
|
||||||
|
|
||||||
if (old_index < new_index)
|
if (old_index < new_index)
|
||||||
{
|
{
|
||||||
delta = 1;
|
delta = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user