Re: Modeless "Adjust" windows can be annoying
Posted by Gabriel Landini on Dec 22, 2009; 12:03pm
URL: http://imagej.273.s1.nabble.com/Modeless-Adjust-windows-can-be-annoying-tp3689943p3689944.html
On Monday 21 December 2009, you wrote:
> This leads to the following undesirable behavior: I have two images
> open. On one, I set a threshold, then eventually close that image
> window. The other image becomes "active." Then I click the Close
> widget on the Threshold dialog, and suddenly my other image is
> unintentionally thresholded. I now have to reopen the dialog, click
> Reset, and then close it again.
You need to press "Reset" before closing. Otherwise when you activate the
thresholder (not surprisingly) the threshold will be computed and shown as a
red LUT.
> I'm not sure how useful the automatic apply-on-activate-dialog feature
> is, given the Apply button on the dialogs that does the same thing under
> explicit user control.
No, the apply button applies the computed threshold (either automatic or
manual) to the currently greyscale image that has the red (or one of the
others) LUT. Otherwise you would not know what you are applying until you
pressed "Apply".
> I would say that the on-activate action should
> be removed. But, if there is a compelling use case, then at least the
> action should be suppressed when the Close widget is clicked.
I do not think this would be desirable. How and when should the thresholder
get the image histogram to compute a threshold and show it? Are you proposing
another button to do this?
If I understand correctly, the problem is that one needs to press Reset to
"not show" it, so really one would be changing pressing one button for
pressing another. There are many more presses to do to gather histograms than
resetting the last one when closing the dialog. I would vote for leaving as it
is.
However, I wonder if on closing the dialog AND while on LUT (red or other)
mode, the image LUT should be reset. That could prevent the issue you raised.
I haven't looked into how easy would be to implement this or whether it might
interfere with macro recording as resetting the threshold might be sending a
resetThreshold() to the recoded macro and one would not like that.
Cheers
G.