Fix cloth editing undo in Prefab viewport

#2136
This commit is contained in:
Wojtek Figat
2024-02-23 19:39:41 +01:00
parent eb12c630a7
commit ee4fc7c201

View File

@@ -154,7 +154,7 @@ namespace FlaxEngine.Tools
if (IsPainting)
return;
if (Editor.Instance.Undo.Enabled)
if (Owner.Undo.Enabled)
_undoAction = new EditClothPaintAction(_cloth);
_isPainting = true;
_paintUpdateCount = 0;
@@ -221,7 +221,7 @@ namespace FlaxEngine.Tools
if (_undoAction != null)
{
_undoAction.RecordEnd();
Editor.Instance.Undo.AddAction(_undoAction);
Owner.Undo.AddAction(_undoAction);
_undoAction = null;
}
_isPainting = false;