Unidata / IDV

The Integrated Data Viewer (IDV) from Unidata is a framework for analyzing and displaying geoscience data.
http://www.unidata.ucar.edu/software/idv/
Other
80 stars 37 forks source link

Obey user's side legend preference. #43

Closed jon4than closed 11 years ago

jon4than commented 11 years ago

If you turn off Edit->Preferences->View->Show Side Legend, click "OK", and create a new window, the legend still appears, but it shows up empty. This change simply avoids creating (and subsequently adding) the side legend itself.

This should fix http://dcdbs.ssec.wisc.edu/inquiry-v/?inquiry=804

yuanho commented 11 years ago

The change of logic in the ViewManager needs more test. I don't like the change in synchronized (legends) {... }, you need to check getShowSideLegend() before the adding.

Yuan

jon4than commented 11 years ago

Fair enough. Should I add a similar check to https://github.com/jon4than/IDV/blob/f5077d0333bd667fc175c9faadd3ddd73d056394/src/ucar/unidata/idv/ViewManager.java#L1107 ?

yuanho commented 11 years ago

After tomorrow release, I will have time to check and test the your changes more carefully.

julienchastang commented 11 years ago

One thing is we are having trouble evaluating your code changes because most of them seem to be formatting changes that are washing out the real changes in the diff. Is there anyway to resubmit this with minimal formatting changes?

jon4than commented 11 years ago

https://github.com/jon4than/IDV/commit/d49261a7c2724ef4e17737f887b799016ce99eb1

I think the problem is that I attempted to reindent a few things that are now inside the getShowSideLegend check. Anyway, the changes in the above commit are pretty much equivalent, though I elected to keep the getShowSideLegend inside the synchronized (legends) block (like Yuan suggested).

I'd be happy to create another pull request.