From 4103b8d9b55e7fd5fc04dca9095d522104de776a Mon Sep 17 00:00:00 2001 From: John Bogovic Date: Wed, 18 Oct 2023 11:51:55 -0400 Subject: [PATCH] fix: navigation key-shortcuts work for both viewers --- src/main/java/bigwarp/BigWarp.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/bigwarp/BigWarp.java b/src/main/java/bigwarp/BigWarp.java index 3aaa4f4b..72f8f5f6 100755 --- a/src/main/java/bigwarp/BigWarp.java +++ b/src/main/java/bigwarp/BigWarp.java @@ -590,11 +590,13 @@ public boolean accept( final File f ) appearanceManager.addLafComponent( fileChooser ); SwingUtilities.invokeLater(() -> appearanceManager.updateLookAndFeel()); - final Actions navigationActions = new Actions( inputTriggerConfig, "navigation" ); - navigationActions.install( getViewerFrameP().getKeybindings(), "navigation" ); - NavigationKeys.install( navigationActions, getViewerFrameP().getViewerPanel(), options.values.is2D() ); - navigationActions.install( getViewerFrameQ().getKeybindings(), "navigation" ); - NavigationKeys.install( navigationActions, getViewerFrameQ().getViewerPanel(), options.values.is2D() ); + final Actions navigationActionsP = new Actions( inputTriggerConfig, "navigation" ); + navigationActionsP.install( getViewerFrameP().getKeybindings(), "navigation" ); + NavigationKeys.install( navigationActionsP, getViewerFrameP().getViewerPanel(), options.values.is2D() ); + + final Actions navigationActionsQ = new Actions( inputTriggerConfig, "navigation" ); + navigationActionsQ.install( getViewerFrameQ().getKeybindings(), "navigation" ); + NavigationKeys.install( navigationActionsQ, getViewerFrameQ().getViewerPanel(), options.values.is2D() ); final BigWarpActions bwActionsP = new BigWarpActions( inputTriggerConfig, "bigwarp" ); final BigWarpActions bwActionsQ = new BigWarpActions( inputTriggerConfig, "bigwarp" );