@@ -78,8 +78,8 @@ public class ImageJ extends Frame implements ActionListener,
7878 MouseListener , KeyListener , WindowListener , ItemListener , Runnable {
7979
8080 /** Plugins should call IJ.getVersion() or IJ.getFullVersion() to get the version string. */
81- public static final String VERSION = "1.54s " ;
82- public static final String BUILD = "" ; //14
81+ public static final String VERSION = "1.54t " ;
82+ public static final String BUILD = "4" ;
8383 public static Color backgroundColor = new Color (237 ,237 ,237 );
8484 /** SansSerif, 12-point, plain font. */
8585 public static final Font SansSerif12 = new Font ("SansSerif" , Font .PLAIN , 12 );
@@ -544,9 +544,9 @@ public void keyPressed(KeyEvent e) {
544544 cmd ="Next Slice [>]" ;
545545 else if (stackKey && keyCode ==KeyEvent .VK_LEFT )
546546 cmd ="Previous Slice [<]" ;
547- else if (zoomKey && keyCode ==KeyEvent .VK_DOWN && !ignoreArrowKeys (imp ) && Toolbar .getToolId ()<Toolbar .SPARE6 )
547+ else if (zoomKey && keyCode ==KeyEvent .VK_DOWN && !ignoreArrowKeys (imp , control ) && Toolbar .getToolId ()<Toolbar .SPARE6 )
548548 cmd ="Out [-]" ;
549- else if (zoomKey && keyCode ==KeyEvent .VK_UP && !ignoreArrowKeys (imp ) && Toolbar .getToolId ()<Toolbar .SPARE6 )
549+ else if (zoomKey && keyCode ==KeyEvent .VK_UP && !ignoreArrowKeys (imp , control ) && Toolbar .getToolId ()<Toolbar .SPARE6 )
550550 cmd ="In [+]" ;
551551 else if (roi !=null ) {
552552 if ((flags & KeyEvent .ALT_MASK )!=0 || (flags & KeyEvent .CTRL_MASK )!=0 )
@@ -604,7 +604,7 @@ private boolean deleteOverlayRoi(ImagePlus imp) {
604604 return false ;
605605 }
606606
607- private boolean ignoreArrowKeys (ImagePlus imp ) {
607+ private boolean ignoreArrowKeys (ImagePlus imp , boolean control ) {
608608 Frame frame = WindowManager .getFrontWindow ();
609609 String title = frame !=null ?frame .getTitle ():null ;
610610 if (title !=null && title .equals ("ROI Manager" ))
@@ -621,6 +621,8 @@ private boolean ignoreArrowKeys(ImagePlus imp) {
621621 // LOCI Data Browser window?
622622 if (imp .getStackSize ()>1 && win !=null && win .getClass ().getName ().startsWith ("loci" ))
623623 return true ;
624+ if (Prefs .requireControlKey && !control )
625+ return true ;
624626 return false ;
625627 }
626628
0 commit comments