Skip to content

Commit

Permalink
2024.11.29 (1.54m28; SetIJMenuBar option)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Nov 29, 2024
1 parent afcce28 commit af2a85e
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ij/ImageJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class ImageJ extends Frame implements ActionListener,

/** Plugins should call IJ.getVersion() or IJ.getFullVersion() to get the version string. */
public static final String VERSION = "1.54m";
public static final String BUILD = "26";
public static final String BUILD = "28";
public static Color backgroundColor = new Color(237,237,237);
/** SansSerif, 12-point, plain font. */
public static final Font SansSerif12 = new Font("SansSerif", Font.PLAIN, 12);
Expand Down
2 changes: 1 addition & 1 deletion ij/gui/PolygonRoi.java
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ else if (xpf!=null)
private boolean isTraced() {
if (type==TRACED_ROI)
return true;
else if (type!=POLYGON)
else if (type!=POLYGON || (this instanceof RotatedRectRoi))
return false;
else if (xp==null) {
if (xpf==null)
Expand Down
2 changes: 1 addition & 1 deletion ij/gui/RotatedRectRoi.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class RotatedRectRoi extends PolygonRoi {
private double rectWidth = DefaultRectWidth;

public RotatedRectRoi(double x1, double y1, double x2, double y2, double rectWidth) {
super(new float[4], new float[4], 4, FREEROI);
super(new float[4], new float[4], 4, POLYGON);
this.rectWidth = rectWidth;
makeRectangle(x1, y1, x2, y2);
state = NORMAL;
Expand Down
2 changes: 2 additions & 0 deletions ij/macro/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -4799,6 +4799,8 @@ else if (arg1.startsWith("calibrate")) {
ImageConverter.setDoScaling(true);
} else if (arg1.startsWith("mousewheel"))
Prefs.mouseWheelStackScrolling = state;
else if (arg1.startsWith("setijmenubar"))
Prefs.setIJMenuBar = state;
else
interp.error("Invalid option");
}
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/CommandFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ private void closeWindow() {
}

public void windowActivated(WindowEvent e) {
if (IJ.isMacOSX() && frame != null)
if (IJ.isMacOSX() && frame != null && Prefs.setIJMenuBar)
frame.setMenuBar(Menus.getMenuBar());
}

Expand Down
7 changes: 6 additions & 1 deletion ij/plugin/Options.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ else if (divValue.equalsIgnoreCase("max"))
Prefs.doNotSaveWindowLocations = !gd.getNextBoolean();
Prefs.nonBlockingFilterDialogs = gd.getNextBoolean();
IJ.setDebugMode(gd.getNextBoolean());
//Prefs.modernMode = gd.getNextBoolean();
if (IJ.recording() && IJ.isMacOSX()) {
if (Recorder.scriptMode())
Recorder.recordCall("Prefs.setIJMenuBar = "+Prefs.setIJMenuBar+";");
else
Recorder.recordString("setOption(\"setIJMenuBar\", "+Prefs.setIJMenuBar+");\n");
}
}

void lineWidth() {
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/frame/Recorder.java
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ public static void setBlackBackground() {

/** Override windowActivated in PlugInFrame. */
public void windowActivated(WindowEvent e) {
if (IJ.isMacintosh() && !IJ.isJava17())
if (IJ.isMacintosh() && !IJ.isJava17() && Prefs.setIJMenuBar)
this.setMenuBar(Menus.getMenuBar());
WindowManager.setWindow(this);
}
Expand Down
7 changes: 6 additions & 1 deletion release-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
<body>


<li> <u>1.54m26 18 November 2024</u>
<li> <u>1.54m28 29 November 2024</u>
<ul>
<li> Thanks to 'Jerry1144', added the setOption("setIJMenuBar",boolean)
macro function
(<a href="http://wsr.imagej.net/macros/MacWindowSwitchingDemo.ijm">example</a>). DOC
<li> Thanks to Kenneth Sloan, added the Roi.setMinStrokeWidth(minStrokeWidth)
macro function and Java method that you can use to specify a
minimum scaled stroke width
Expand Down Expand Up @@ -45,6 +48,8 @@
<li> Thanks to 'scouser27', fixed bug with ROI Manager
"Multi Measure" command when "Measure all n slices" was
not checked and "One row per slice" was.
<li> Thanks to 'scouser27', fixed a bug with how perimeters
of rotated rectangle selections are calculated.
</ul>

<li> <u>1.54k 15 September 2024</u>
Expand Down

1 comment on commit af2a85e

@imagesc-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/imagej-1-54m-n-p-bug-fixes/108929/3

Please sign in to comment.