Skip to content

Commit af2a85e

Browse files
committed
2024.11.29 (1.54m28; SetIJMenuBar option)
1 parent afcce28 commit af2a85e

File tree

8 files changed

+19
-7
lines changed

8 files changed

+19
-7
lines changed

ij/ImageJ.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public class ImageJ extends Frame implements ActionListener,
7979

8080
/** Plugins should call IJ.getVersion() or IJ.getFullVersion() to get the version string. */
8181
public static final String VERSION = "1.54m";
82-
public static final String BUILD = "26";
82+
public static final String BUILD = "28";
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);

ij/gui/PolygonRoi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ else if (xpf!=null)
14201420
private boolean isTraced() {
14211421
if (type==TRACED_ROI)
14221422
return true;
1423-
else if (type!=POLYGON)
1423+
else if (type!=POLYGON || (this instanceof RotatedRectRoi))
14241424
return false;
14251425
else if (xp==null) {
14261426
if (xpf==null)

ij/gui/RotatedRectRoi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class RotatedRectRoi extends PolygonRoi {
1414
private double rectWidth = DefaultRectWidth;
1515

1616
public RotatedRectRoi(double x1, double y1, double x2, double y2, double rectWidth) {
17-
super(new float[4], new float[4], 4, FREEROI);
17+
super(new float[4], new float[4], 4, POLYGON);
1818
this.rectWidth = rectWidth;
1919
makeRectangle(x1, y1, x2, y2);
2020
state = NORMAL;

ij/macro/Functions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4799,6 +4799,8 @@ else if (arg1.startsWith("calibrate")) {
47994799
ImageConverter.setDoScaling(true);
48004800
} else if (arg1.startsWith("mousewheel"))
48014801
Prefs.mouseWheelStackScrolling = state;
4802+
else if (arg1.startsWith("setijmenubar"))
4803+
Prefs.setIJMenuBar = state;
48024804
else
48034805
interp.error("Invalid option");
48044806
}

ij/plugin/CommandFinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ private void closeWindow() {
636636
}
637637

638638
public void windowActivated(WindowEvent e) {
639-
if (IJ.isMacOSX() && frame != null)
639+
if (IJ.isMacOSX() && frame != null && Prefs.setIJMenuBar)
640640
frame.setMenuBar(Menus.getMenuBar());
641641
}
642642

ij/plugin/Options.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,12 @@ else if (divValue.equalsIgnoreCase("max"))
8484
Prefs.doNotSaveWindowLocations = !gd.getNextBoolean();
8585
Prefs.nonBlockingFilterDialogs = gd.getNextBoolean();
8686
IJ.setDebugMode(gd.getNextBoolean());
87-
//Prefs.modernMode = gd.getNextBoolean();
87+
if (IJ.recording() && IJ.isMacOSX()) {
88+
if (Recorder.scriptMode())
89+
Recorder.recordCall("Prefs.setIJMenuBar = "+Prefs.setIJMenuBar+";");
90+
else
91+
Recorder.recordString("setOption(\"setIJMenuBar\", "+Prefs.setIJMenuBar+");\n");
92+
}
8893
}
8994

9095
void lineWidth() {

ij/plugin/frame/Recorder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ public static void setBlackBackground() {
10231023

10241024
/** Override windowActivated in PlugInFrame. */
10251025
public void windowActivated(WindowEvent e) {
1026-
if (IJ.isMacintosh() && !IJ.isJava17())
1026+
if (IJ.isMacintosh() && !IJ.isJava17() && Prefs.setIJMenuBar)
10271027
this.setMenuBar(Menus.getMenuBar());
10281028
WindowManager.setWindow(this);
10291029
}

release-notes.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
<body>
77

88

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

5055
<li> <u>1.54k 15 September 2024</u>

0 commit comments

Comments
 (0)