mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 20:06:33 +00:00
UI - Rename folders and layers in a dialog to avoid hotkey issues
UI - Fixed renaming an effect executing twice, requiring two undo-actions to undo it UI - Always disable editor hotkeys when typing in any input
This commit is contained in:
1 parent
0b5866a2b8
commit
192b4f0df2
20 files changed
+166
-147
No files matched your search
@@ -8,7 +8,7 @@
|
||||
x:DataType="sidebar:SidebarCategoryEditViewModel">
|
||||
<StackPanel>
|
||||
<StackPanel.KeyBindings>
|
||||
<KeyBinding Gesture="Enter" Command="{CompiledBinding Confirm}" />
|
||||
<KeyBinding Gesture="Enter" Command="{CompiledBinding Enter}" />
|
||||
</StackPanel.KeyBindings>
|
||||
<TextBox Text="{CompiledBinding CategoryName}" Watermark="Category name"/>
|
||||
</StackPanel>
|
||||
|
||||
@@ -24,6 +24,7 @@ public class SidebarCategoryEditViewModel : ContentDialogViewModelBase
|
||||
_categoryName = _category.Name;
|
||||
|
||||
Confirm = ReactiveCommand.Create(ExecuteConfirm, ValidationContext.Valid);
|
||||
Enter = ReactiveCommand.Create(() => ContentDialog?.Hide(ContentDialogResult.Primary), Confirm.CanExecute);
|
||||
this.ValidationRule(vm => vm.CategoryName, categoryName => !string.IsNullOrWhiteSpace(categoryName?.Trim()), "You must specify a valid name");
|
||||
this.ValidationRule(vm => vm.CategoryName, categoryName => profileService.ProfileCategories.All(c => c.Name != categoryName?.Trim()), "You must specify a unique name");
|
||||
}
|
||||
@@ -35,6 +36,7 @@ public class SidebarCategoryEditViewModel : ContentDialogViewModelBase
|
||||
}
|
||||
|
||||
public ReactiveCommand<Unit, Unit> Confirm { get; }
|
||||
public ReactiveCommand<Unit, Unit> Enter { get; }
|
||||
|
||||
private void ExecuteConfirm()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user