Fixed undo/redo bug

This commit is contained in:
Jaex 2023-12-27 08:56:07 +03:00
parent 3be1ffeefa
commit e5fe1a8e70

View file

@ -1552,6 +1552,13 @@ public void RestoreState(ImageEditorMemento memento)
} }
Shapes = memento.Shapes; Shapes = memento.Shapes;
foreach (BaseEffectShape effect in EffectShapes)
{
effect.OnMoved();
}
OnImageModified();
UpdateMenu(); UpdateMenu();
} }
} }
@ -1820,6 +1827,7 @@ private void DuplicateCurrrentShape(bool insertMousePosition)
if (shape != null && shape.IsHandledBySelectTool) if (shape != null && shape.IsHandledBySelectTool)
{ {
BaseShape shapeCopy = shape.Duplicate(); BaseShape shapeCopy = shape.Duplicate();
if (shapeCopy != null) if (shapeCopy != null)
{ {
if (insertMousePosition) if (insertMousePosition)