mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
UI - Fixed empty screen when opening from tray
UI - Fixed editor getting stuck when closed to tray
This commit is contained in:
1 parent
311bdee8da
commit
e2f456866a
4 files changed
+12
-8
No files matched your search
@@ -1,5 +1,4 @@
|
||||
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core;
|
||||
@@ -92,12 +91,11 @@ namespace Artemis.UI.Screens.Root
|
||||
set => RaiseAndSetIfChanged(ref _titleBarViewModel, value);
|
||||
}
|
||||
|
||||
private void CurrentMainWindowOnClosed(object? sender, EventArgs e)
|
||||
private void CurrentMainWindowOnClosing(object? sender, EventArgs e)
|
||||
{
|
||||
_lifeTime.MainWindow = null;
|
||||
SidebarViewModel = null;
|
||||
Router.NavigateAndReset.Execute(new EmptyViewModel(this, "blank")).Subscribe();
|
||||
|
||||
OnMainWindowClosed();
|
||||
}
|
||||
|
||||
@@ -190,7 +188,7 @@ namespace Artemis.UI.Screens.Root
|
||||
SidebarViewModel = _sidebarVmFactory.SidebarViewModel(this);
|
||||
_lifeTime.MainWindow = new MainWindow {DataContext = this};
|
||||
_lifeTime.MainWindow.Show();
|
||||
_lifeTime.MainWindow.Closed += CurrentMainWindowOnClosed;
|
||||
_lifeTime.MainWindow.Closing += CurrentMainWindowOnClosing;
|
||||
}
|
||||
|
||||
_lifeTime.MainWindow.WindowState = WindowState.Normal;
|
||||
|
||||
Reference in new issue
Block a user