From 9fe874cc5b8a150725db811c44b9fb2706624960 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 7 Mar 2024 21:38:25 +0100 Subject: [PATCH] Revert profiler events to pass nunit tests without engine in-use 6d98bc5ef84b6cb87e2af429ab18da7814b56c00 --- Source/Editor/Undo/Undo.cs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Source/Editor/Undo/Undo.cs b/Source/Editor/Undo/Undo.cs index a5c5a684f..4435ec764 100644 --- a/Source/Editor/Undo/Undo.cs +++ b/Source/Editor/Undo/Undo.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Linq; using FlaxEditor.History; using FlaxEditor.Utilities; -using FlaxEngine; using FlaxEngine.Collections; namespace FlaxEditor @@ -134,11 +133,9 @@ namespace FlaxEditor { if (!Enabled) return; - Profiler.BeginEvent("Undo.RecordBegin"); _snapshots.Add(snapshotInstance, new UndoInternal(snapshotInstance, actionString)); - Profiler.EndEvent(); } /// @@ -151,7 +148,6 @@ namespace FlaxEditor { if (!Enabled) return; - Profiler.BeginEvent("Undo.RecordEnd"); if (snapshotInstance == null) snapshotInstance = _snapshots.Last().Key; @@ -178,8 +174,6 @@ namespace FlaxEditor UndoOperationsStack.Push(action); OnAction(action); } - - Profiler.EndEvent(); } /// @@ -235,11 +229,8 @@ namespace FlaxEditor { if (!Enabled) return; - Profiler.BeginEvent("Undo.RecordMultiBegin"); _snapshots.Add(snapshotInstances, new UndoMultiInternal(snapshotInstances, actionString)); - - Profiler.EndEvent(); } /// @@ -252,7 +243,6 @@ namespace FlaxEditor { if (!Enabled) return; - Profiler.BeginEvent("Undo.RecordMultiEnd"); if (snapshotInstance == null) snapshotInstance = (object[])_snapshots.Last().Key; @@ -279,8 +269,6 @@ namespace FlaxEditor UndoOperationsStack.Push(action); OnAction(action); } - - Profiler.EndEvent(); } /// @@ -345,14 +333,11 @@ namespace FlaxEditor { if (!Enabled || !CanUndo) return; - Profiler.BeginEvent("Undo.PerformUndo"); var action = (IUndoAction)UndoOperationsStack.PopHistory(); action.Undo(); OnUndo(action); - - Profiler.EndEvent(); } /// @@ -362,14 +347,11 @@ namespace FlaxEditor { if (!Enabled || !CanRedo) return; - Profiler.BeginEvent("Undo.PerformRedo"); var action = (IUndoAction)UndoOperationsStack.PopReverse(); action.Do(); OnRedo(action); - - Profiler.EndEvent(); } ///