mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
refine the plate's sliced_result logic
1. when the plate is locked, the sliced result is kept after auto-arrange; 2. when only arrange a plate, other plates' results are not affected Change-Id: I7566e11e9eec0c2b196a2e78d9dc306ea325e9ff
This commit is contained in:
parent
8386b48554
commit
516a960f71
3 changed files with 32 additions and 17 deletions
|
@ -412,7 +412,7 @@ void ArrangeJob::prepare()
|
|||
|
||||
//add the virtual object into unselect list if has
|
||||
m_plater->get_partplate_list().preprocess_exclude_areas(m_unselected, MAX_NUM_PLATES);
|
||||
|
||||
|
||||
#if SAVE_ARRANGE_POLY
|
||||
if (1)
|
||||
{ // subtract excluded region and get a polygon bed
|
||||
|
@ -625,8 +625,11 @@ void ArrangeJob::finalize() {
|
|||
//BBS: partplate
|
||||
PartPlateList& plate_list = m_plater->get_partplate_list();
|
||||
//clear all the relations before apply the arrangement results
|
||||
plate_list.clear();
|
||||
|
||||
if (only_on_partplate) {
|
||||
plate_list.clear(false, false, true, current_plate_index);
|
||||
}
|
||||
else
|
||||
plate_list.clear(false, false, true, -1);
|
||||
//BBS: adjust the bed_index, create new plates, get the max bed_index
|
||||
for (ArrangePolygon& ap : m_selected) {
|
||||
//if (ap.bed_idx < 0) continue; // bed_idx<0 means unarrangable
|
||||
|
@ -709,7 +712,12 @@ void ArrangeJob::finalize() {
|
|||
m_plater->get_notification_manager()->close_notification_of_type(NotificationType::ArrangeOngoing);
|
||||
|
||||
//BBS: reload all objects due to arrange
|
||||
plate_list.rebuild_plates_after_arrangement(!only_on_partplate);
|
||||
if (only_on_partplate) {
|
||||
plate_list.rebuild_plates_after_arrangement(!only_on_partplate, true, current_plate_index);
|
||||
}
|
||||
else {
|
||||
plate_list.rebuild_plates_after_arrangement(!only_on_partplate, true);
|
||||
}
|
||||
|
||||
// BBS: update slice context and gcode result.
|
||||
m_plater->update_slicing_context_to_current_partplate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue