mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Scripting - Add confirm dialog when discarding changes
Editor - Fix missing repeat mode button Editor - Auto-save 1 sec after last change General UI - Fix main window drag handle
This commit is contained in:
1 parent
e3907e6a76
commit
311bdee8da
13 files changed
+103
-25
No files matched your search
+10
-3
@@ -6,6 +6,8 @@ namespace Artemis.UI.Screens.ProfileEditor.Properties.Windows;
|
||||
|
||||
public class BrushConfigurationWindowView : ReactiveCoreWindow<BrushConfigurationWindowViewModel>
|
||||
{
|
||||
private bool _canClose;
|
||||
|
||||
public BrushConfigurationWindowView()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -22,9 +24,14 @@ public class BrushConfigurationWindowView : ReactiveCoreWindow<BrushConfiguratio
|
||||
|
||||
private async void OnClosing(object? sender, CancelEventArgs e)
|
||||
{
|
||||
if (ViewModel == null)
|
||||
if (_canClose)
|
||||
return;
|
||||
|
||||
e.Cancel = !await ViewModel.CanClose();
|
||||
|
||||
e.Cancel = true;
|
||||
if (ViewModel == null || await ViewModel.CanClose())
|
||||
{
|
||||
_canClose = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
-3
@@ -6,6 +6,8 @@ namespace Artemis.UI.Screens.ProfileEditor.Properties.Windows;
|
||||
|
||||
public class EffectConfigurationWindowView : ReactiveCoreWindow<EffectConfigurationWindowViewModel>
|
||||
{
|
||||
private bool _canClose;
|
||||
|
||||
public EffectConfigurationWindowView()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -22,9 +24,14 @@ public class EffectConfigurationWindowView : ReactiveCoreWindow<EffectConfigurat
|
||||
|
||||
private async void OnClosing(object? sender, CancelEventArgs e)
|
||||
{
|
||||
if (ViewModel == null)
|
||||
if (_canClose)
|
||||
return;
|
||||
|
||||
e.Cancel = !await ViewModel.CanClose();
|
||||
|
||||
e.Cancel = true;
|
||||
if (ViewModel == null || await ViewModel.CanClose())
|
||||
{
|
||||
_canClose = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user