ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE -> Added undo/redo

This commit is contained in:
Enrico Turri 2019-11-27 11:08:10 +01:00
parent 55a163e216
commit 5fcf41a3aa
3 changed files with 7 additions and 2 deletions

View file

@ -4177,6 +4177,7 @@ void Plater::priv::undo_redo_to(std::vector<UndoRedo::Snapshot>::const_iterator
// Disable layer editing before the Undo / Redo jump.
if (!new_variable_layer_editing_active && view3D->is_layers_editing_enabled())
view3D->get_canvas3d()->force_main_toolbar_left_action(view3D->get_canvas3d()->get_main_toolbar_item_id("layersediting"));
// Make a copy of the snapshot, undo/redo could invalidate the iterator
const UndoRedo::Snapshot snapshot_copy = *it_snapshot;
// Do the jump in time.