Skip to content

Commit bf83d57

Browse files
committed
2026.04.16 (1.54t4; Arrow keys)
1 parent 9a7e6c2 commit bf83d57

4 files changed

Lines changed: 185 additions & 90 deletions

File tree

ij/ImageJ.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

ij/Menus.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ public static Menu getExamplesMenu(ActionListener listener) {
315315

316316
submenu = new Menu("Macro");
317317
addExample(submenu, "Sphere", "Sphere.ijm");
318+
addExample(submenu, "Pong", "Pong.ijm");
318319
addExample(submenu, "Dialog Box", "Dialog_Box.ijm");
319320
addExample(submenu, "Process Folder", "Batch_Process_Folder.ijm");
320321
addExample(submenu, "OpenDialog Demo", "OpenDialog_Demo.ijm");
@@ -338,6 +339,7 @@ public static Menu getExamplesMenu(ActionListener listener) {
338339

339340
submenu = new Menu("JavaScript");
340341
addExample(submenu, "Sphere", "Sphere.js");
342+
addExample(submenu, "Asteroids", "Asteroids.js");
341343
addExample(submenu, "Plasma Cloud", "Plasma_Cloud.js");
342344
addExample(submenu, "Cloud Debugger", "Cloud_Debugger.js");
343345
addExample(submenu, "Synthetic Images", "Synthetic_Images.js");

0 commit comments

Comments
 (0)