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
79 stars 37 forks source link

Restore user's selected logo position. #75

Closed jon4than closed 10 years ago

jon4than commented 10 years ago

If a user does something like:

  1. Open the View>Properties window.
  2. Select a screen position other than Lower Left.
  3. Click OK to close the window.
  4. Reopen the View>Properties window.

Prior to this commit, the screen position will be reset to "Lower Left". This commit simply remembers the user's selection by storing it in a new ViewManager String field ("selectedLogoPosition").

Since the selection is just an instance field, the selected value is only remembered for the lifetime of the ViewManager and each ViewManager can have a different selected value (but this seems to conform pretty well with how things “should” work?).

This is a fix for Inquiry 1219: http://mcidas.ssec.wisc.edu/inquiry-v/?inquiry=1219

donmurray commented 10 years ago

jon-

The position that the user selects should be retained already in the field logoPosition (that's how stuff gets persisted). logos[0] should be the parsed version of that. I don't think you need a new variable - I think you need to figure out why the current code isn't working. I suspect it's because the logos[0] is a string and the list is a set of TwoFacedObjects. You could find the correct TFO in the list and set that as the selected item. Look in TwoFacedObject for methods on searching a list.

jon4than commented 10 years ago

Implemented Don's suggestions in #76, so not much point in keeping this open.

:squirrel: