Skip to content

Commit b9b7f93

Browse files
committed
2024.07.10 (1.54k10; Image>Duplicate)
1 parent 8799326 commit b9b7f93

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
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.54k";
82-
public static final String BUILD = "8";
82+
public static final String BUILD = "10";
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/macro/Functions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3194,9 +3194,9 @@ void setFont() {
31943194
String styles = getLastString().toLowerCase();
31953195
if (styles.contains("bold")) style += Font.BOLD;
31963196
if (styles.contains("italic")) style += Font.ITALIC;
3197-
if (styles.contains("non-")||styles.contains("no-")) antialiasedText=false;
31983197
if (styles.contains("nonscal")) nonScalableText=true;
31993198
if (styles.contains("anti")) antialiasedText=true;
3199+
if (styles.contains("non-")||styles.contains("no-")) antialiasedText=false;
32003200
} else
32013201
interp.getRightParen();
32023202
}

ij/plugin/Duplicator.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@ public void run(String arg) {
4545
Rectangle bounds = imp.getRoi().getBounds();
4646
imp.setRoi(bounds);
4747
}
48+
boolean roiOutside = false;
4849
if (roiA!=null) {
4950
Rectangle r = roiA.getBounds();
5051
if (r.x>=imp.getWidth() || r.y>=imp.getHeight() || r.x+r.width<=0 || r.y+r.height<=0) {
51-
IJ.error("Roi is outside image");
52-
return;
52+
ignoreSelection = true;
53+
roiOutside = true;
5354
}
5455
}
5556
int stackSize = imp.getStackSize();
@@ -87,7 +88,8 @@ else if (duplicateStack || imp.getStackSize()==1) {
8788
}
8889
if (ignoreSelection && roi!=null) {
8990
imp.setRoi(roi);
90-
imp2.setRoi((Roi)roi.clone());
91+
if (!roiOutside)
92+
imp2.setRoi((Roi)roi.clone());
9193
}
9294
Calibration cal = imp2.getCalibration();
9395
if (roi!=null && (cal.xOrigin!=0.0||cal.yOrigin!=0.0)) {

release-notes.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
</head>
66
<body>
77

8-
<li> <u>1.54k8 28 June 2024</u>
8+
<li> <u>1.54k10 2 July 2024</u>
99
<ul>
10+
<li> Thanks to Bram van den Broek, the <i>Image&gt;Duplicate</i>
11+
command enables the "Ignore Selection" option when the ROI is
12+
outside the image.
1013
<li> Thanks to Herbie Gluender, the <i>Image&gt;Duplicate</i>
1114
command retains the selection when "Ignore Selection" is
1215
checked in the dialog.
@@ -22,6 +25,9 @@
2225
<li> Thanks to Philippe Carl and Michael Schmid, fixed bug
2326
where the roiManager("select",index) macro function did
2427
not remove previous selections.
28+
<li> Thanks to Oleg Dobrokhotov, fixed bug with the
29+
"non-antialiased" option of the setFont() macro
30+
function to not work as expected.
2531
<li> Thanks to Felix Rudolphi and Curtis Rueden, fixed a
2632
1.54i regression that caused FileOpener to throw
2733
HeadlessExceptions in headless environments.

0 commit comments

Comments
 (0)