From 4d7d4762b33ccd30c796a1011ec68dcd4a6bcd65 Mon Sep 17 00:00:00 2001 From: Haven1433 Date: Tue, 13 Sep 2022 06:31:10 -0500 Subject: [PATCH] fix navigation commands --- src/HexManiac.WPF/Controls/MapTab.xaml.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/HexManiac.WPF/Controls/MapTab.xaml.cs b/src/HexManiac.WPF/Controls/MapTab.xaml.cs index 40e5d073..f8151322 100644 --- a/src/HexManiac.WPF/Controls/MapTab.xaml.cs +++ b/src/HexManiac.WPF/Controls/MapTab.xaml.cs @@ -57,6 +57,14 @@ namespace HavenSoft.HexManiac.WPF.Controls { private MouseButton withinMapInteraction = MouseButton.XButton1; // track which button is being used. Set to XButton1 when not in use. private void ButtonDown(object sender, MouseButtonEventArgs e) { + if (e.ChangedButton == MouseButton.XButton1 && ViewModel.Back.CanExecute(null)) { + ViewModel.Back.Execute(); + return; + } + if (e.ChangedButton == MouseButton.XButton2 && ViewModel.Forward.CanExecute(null)) { + ViewModel.Forward.Execute(); + return; + } if (withinMapInteraction != MouseButton.XButton1) return; Focus(); e.Handled = true;