mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +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
@@ -132,6 +132,7 @@ public class MenuBarViewModel : ActivatableViewModelBase
|
||||
return;
|
||||
|
||||
await _windowService.ShowDialogAsync<ScriptsDialogViewModel, object?>(("profile", ProfileConfiguration.Profile));
|
||||
await _profileEditorService.SaveProfileAsync();
|
||||
}
|
||||
|
||||
private async Task ExecuteAdaptProfile()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<avalonia:MaterialIcon Kind="SkipNext" />
|
||||
</Button>
|
||||
<ToggleButton Classes="icon-button icon-button-large"
|
||||
IsChecked="{CompiledBinding Repeating}"
|
||||
IsChecked="{CompiledBinding Repeating, Mode=OneWay}"
|
||||
Focusable="False"
|
||||
Command="{CompiledBinding CycleRepeating}">
|
||||
<ToolTip.Tip>
|
||||
|
||||
@@ -28,7 +28,8 @@ public class PlaybackViewModel : ActivatableViewModelBase
|
||||
{
|
||||
_profileEditorService = profileEditorService;
|
||||
_settingsService = settingsService;
|
||||
|
||||
_repeatTimeline = true;
|
||||
|
||||
this.WhenActivated(d =>
|
||||
{
|
||||
_profileEditorService.ProfileElement.Subscribe(e => _profileElement = e).DisposeWith(d);
|
||||
@@ -142,6 +143,7 @@ public class PlaybackViewModel : ActivatableViewModelBase
|
||||
{
|
||||
RepeatTimeline = false;
|
||||
RepeatSegment = true;
|
||||
this.RaisePropertyChanged(nameof(Repeating));
|
||||
}
|
||||
else if (RepeatSegment)
|
||||
{
|
||||
@@ -149,6 +151,7 @@ public class PlaybackViewModel : ActivatableViewModelBase
|
||||
RepeatSegment = false;
|
||||
Repeating = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private TimeSpan GetCurrentSegmentStart()
|
||||
|
||||
+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