mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-10-02 13:16:35 -05:00
fix navigation commands
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user