Просмотр исходного кода

Remove deadlock detection helper

CPKreuz 1 год назад
Родитель
Сommit
0a4cd2d192

+ 3 - 3
src/PixiEditor/Helpers/DeadlockDetectionHelper.cs

@@ -29,7 +29,7 @@ internal class DeadlockDetectionHelper
     
     public DateTime StartTime { get; private set; }
     
-    public static DeadlockDetectionHelper Current { get; private set; }
+    // public static DeadlockDetectionHelper Current { get; private set; }
 
     public int TotalChecks => totalChecks;
     
@@ -43,12 +43,12 @@ internal class DeadlockDetectionHelper
     
     public DeadlockDetectionHelper()
     {
-        if (Current != null)
+        // if (Current != null)
         {
             throw new InvalidOperationException("There's already a deadlock detection helper");
         }
         
-        Current = this;
+        // Current = this;
     }
     
     public void Start()

+ 2 - 2
src/PixiEditor/ViewModels/SubViewModels/Main/DebugViewModel.cs

@@ -210,8 +210,8 @@ internal class DebugViewModel : SubViewModel<ViewModelMain>
         window.Activate();
     }
 
-    [Command.Debug("PixiEditor.Debug.OpenDeadlockDetectionDebugWindow", "Deadlock Detection Debug Popup", "Open Deadlock Detection Debug Popup")]
-    public void OpenDeadlockDetectionDebugPopup() => new DeadlockDetectionDebugPopup().Show();
+    // [Command.Debug("PixiEditor.Debug.OpenDeadlockDetectionDebugWindow", "Deadlock Detection Debug Popup", "Open Deadlock Detection Debug Popup")]
+    // public void OpenDeadlockDetectionDebugPopup() => new DeadlockDetectionDebugPopup().Show();
 
     [Command.Internal("PixiEditor.Debug.SetLanguageFromFilePicker")]
     public void SetLanguageFromFilePicker()

+ 1 - 1
src/PixiEditor/Views/Dialogs/DebugDialogs/DeadlockDetectionDebugPopup.xaml.cs

@@ -64,7 +64,7 @@ public partial class DeadlockDetectionDebugPopup : Window
     
     public DeadlockDetectionDebugPopup()
     {
-        helper = DeadlockDetectionHelper.Current;
+        //helper = DeadlockDetectionHelper.Current;
         DataContext = this;
         InitializeComponent();
         Refresh_OnClick(null, null);

+ 0 - 3
src/PixiEditor/Views/MainWindow.xaml

@@ -398,9 +398,6 @@
                         <MenuItem
                             ui1:Translator.Key="OPEN_LOCALIZATION_DEBUG_WINDOW"
                             cmds:Menu.Command="PixiEditor.Debug.OpenLocalizationDebugWindow"/>
-                        <MenuItem
-                            Header="Open Deadlock Detection Debug Window"
-                            cmds:Menu.Command="PixiEditor.Debug.OpenDeadlockDetectionDebugWindow"/>
                         <Separator/>
                         <MenuItem
                             ui1:Translator.Key="OPEN_LOCAL_APPDATA_DIR"

+ 3 - 3
src/PixiEditor/Views/MainWindow.xaml.cs

@@ -35,7 +35,7 @@ internal partial class MainWindow : Window
     private readonly IPlatform platform;
     private readonly IServiceProvider services;
     private static ExtensionLoader extLoader;
-    private DeadlockDetectionHelper deadlockDetection;
+    // private DeadlockDetectionHelper deadlockDetection;
 
     public static MainWindow Current { get; private set; }
 
@@ -67,8 +67,8 @@ internal partial class MainWindow : Window
 
         InitializeComponent();
 
-        deadlockDetection = new DeadlockDetectionHelper();
-        deadlockDetection.Start();
+        // deadlockDetection = new DeadlockDetectionHelper();
+        // deadlockDetection.Start();
         
         OnDataContextInitialized?.Invoke();
         pixiEditorLogo = BitmapFactory.FromResource(@"/Images/PixiEditorLogo.png");