From ee4fc7c2017e379200d1a0a6a0fcb416a0faa125 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Fri, 23 Feb 2024 19:39:41 +0100 Subject: [PATCH] Fix cloth editing undo in Prefab viewport #2136 --- Source/Editor/Tools/ClothPainting.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Tools/ClothPainting.cs b/Source/Editor/Tools/ClothPainting.cs index 6a98a3b5f..3a39b30ab 100644 --- a/Source/Editor/Tools/ClothPainting.cs +++ b/Source/Editor/Tools/ClothPainting.cs @@ -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;