imagej / ImageJ

Public domain software for processing and analyzing scientific images
http://imagej.org
Other
576 stars 227 forks source link

Call to equals() always returns false #222

Open scuniff opened 1 year ago

scuniff commented 1 year ago

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.

rasband commented 1 year ago

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()