Posted by
Michael Schmid on
Oct 22, 2020; 8:08pm
URL: http://imagej.273.s1.nabble.com/Bugs-in-the-Window-menu-tp5024099p5024101.html
Hi Stein,
concerning the first issue, the unexpected ordering of the images in the
Window menu, it might be a race condition. On my Linux machine, the
Window menu has t1-head at the top and t4-head at the bottom.
I tried with many images (387) as well as with few images (3) in the
input directory.
Could you please have a look at the imageIDs? Images added later should
have a more negative ImageID (you can see it with Image>Show Info, there
is a line starting with "ID".
Usually, each new image gets the most negative ID so far minus 1.
In the current case, opening an image sequence creates a temporary image
for each file opened (as many as there are images in the directory), so
the spacing between the IDs will be more than one.
I did not try to reproduce the 2nd bug, installing a Plugin in the
Windows menu.
I noticed, however, that "Help>Refresh Menus" erases the list of images
in the Window menu (and after "Help>Refresh Menus" and opening new
images, images that are closed sometimes don't disappear from the Window
menu). So it would make sense to add some method that rebuilds the list
of Windows (probably sorted by the ImageIDs), and call this method not
only with "Help>Refresh Menus" but also if a plugin is installed.
Michael
________________________________________________________________
On 22.10.20 20:39, Stein Rørvik wrote:
> There has for a long time been a bug in the Window menu that sometimes causes the wrong image to be selected when selecting an image name from the dropdown, but I have not been able to reproduce it earlier as it depends on the order of window opening and closing. But today I found a simple way to reproduce the issue:
>
> dir = "C:/Users/steinr/Temp/t1-head/";
> run("Close All");
> run("Image Sequence...", "open=&dir sort");
> rename("t1-head");
> run("Image Sequence...", "open=&dir sort");
> rename("t2-head");
> run("Image Sequence...", "open=&dir sort");
> rename("t3-head");
> run("Image Sequence...", "open=&dir sort");
> rename("t4-head");
>
> Selecting the first image on the list selects the first window, but the window title entries in the Window menu is in the wrong order; "t1-head" is at the bottom of the list.
>
> This bug has been there for a couple of years; I reverted to earlier versions and found that this was working in 1.52e and fails in 1.52f.
>
> Another bug is that if a plugin should happen to install an entry to the Window menu, the plugin entry appears as expected before the list of open images, but the image titles in the menu do not match the corresponding image window. Probably the building of the window menu list forgets to take into account the possibility of extra menu entries already there. This bug does not occur in Fiji.
>
> Stein
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html