ImageJ icon indicating copy to clipboard operation
ImageJ copied to clipboard

Call to equals() always returns false

Open scuniff opened this issue 1 year ago • 1 comments

The following should probably be reviewed:

https://github.com/imagej/ImageJ/blob/master/ij/gui/ImageWindow.java

Line 458 if (initialLoc!=null && ! bounds.equals(initialLoc) && !IJ.isMacro()

Referring to the code: bounds.equals(initialLoc)

variable bounds is of type java.awt.Rectangle
variable initialLoc is of type java.awt.Point

so the equals() method will always return false.

scuniff avatar Aug 25 '23 03:08 scuniff

The ImageJ 1.45g14 daily build changes line 458 of ImageWindow.java from

if (initialLoc!=null && ! bounds.equals(initialLoc) && !IJ.isMacro()

to

if (!IJ.isMacro()

rasband avatar Aug 25 '23 05:08 rasband