New selection -> Keep selection after instance inscrease/decrease command

This commit is contained in:
Enrico Turri 2018-10-23 09:19:41 +02:00
parent fab4f55e63
commit 1979ba0e0f

View file

@ -2094,6 +2094,10 @@ void Plater::increase_instances(size_t num)
p->update();
}
#if ENABLE_EXTENDED_SELECTION
p->get_selection().add_instance(obj_idx, (int)model_object->instances.size() - 1);
#endif // ENABLE_EXTENDED_SELECTION
p->selection_changed();
// $self->schedule_background_process;
@ -2137,6 +2141,12 @@ void Plater::decrease_instances(size_t num)
}
p->update();
#if ENABLE_EXTENDED_SELECTION
if (!model_object->instances.empty())
p->get_selection().add_instance(obj_idx, (int)model_object->instances.size() - 1);
#endif // ENABLE_EXTENDED_SELECTION
p->selection_changed();
// $self->schedule_background_process;