From 2e9b3d59d67394ae12b9267509d81b1396cbd96e Mon Sep 17 00:00:00 2001 From: Robert Date: Sat, 10 Jun 2023 13:23:38 +0200 Subject: [PATCH] Added workaround for invalidation issue in pan/zoom elements --- src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs | 2 +- .../Panels/VisualEditor/VisualEditorView.axaml.cs | 5 +++++ .../Screens/SurfaceEditor/SurfaceEditorView.axaml.cs | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs b/src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs index 34a3af852..cb85a0bc6 100644 --- a/src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs +++ b/src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs @@ -187,7 +187,7 @@ public partial class DraggableNumberBox : UserControl private void HandleKeyUp(object? sender, KeyEventArgs e) { - if (e.Key == Key.Enter || e.Key == Key.Escape) + if (e.Key is Key.Enter or Key.Escape) Focus(); } diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/VisualEditorView.axaml.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/VisualEditorView.axaml.cs index 3fb88d5c5..87e7b3b2e 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/VisualEditorView.axaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/VisualEditorView.axaml.cs @@ -63,7 +63,12 @@ public partial class VisualEditorView : ReactiveUserControl