Unidata/IDV — pull request #67 by lesserwhirls (2014-03-19 21:03:02+00:00)
Title: fixes issue reported by Tom W. where switching between streamlines/vecto...

...rs and different smoothing/non-smoothing options leads to funky-ness.

***Needs review!*** Not sure what the point of having Flow1 and Flow2 Keys for the various VisAD shadow objects that are created by the PlanFlowView controls; these are created when changing between vectors/streamlines and smoothing/non-smoothing options. Somewhere, the book keeping of flow1 and flow2, things get messed up and the ability to change between vector and streamline, smoothed/not-smoothed displays starts to fail (see Tom's ticket below). If all shadow objects are forced to use a Flow1 key, then everything seems to work just fine. I tested with bundles created with a 5.0 nightly build, and they still work just fine when useFlow1 is forced to be true.

Tom's latest ticket in e-support:

Hi Sean...

(I talked briefly with Don about this and he mentioned there was no
ticket for it, so I'm sending this through support to get one for
tracking.)

I wanted to follow-up on this issue of "smoothing" in the
streamline/vector display. Last September you wrote that you'd been
looking into this and it appeared that the error message was coming
from VisAD, and I agree (visad.ShadowType); however, I think it's
because there is something else going on in the IDV.

I gotta think it's something in one of the "Flow Controls" that's not
being set (un-set?) right...try this:

1. load up a streamline display
2. in the Control, change the Smoothing to not-None.
3. change the Smoothing back. So far so good.
4. Now switch to "Show: Vectors"...oops, no vectors.

Sometimes after doing this, I noticed that if I then change the
smoothing type to something else, the correct display appears....

If you start again, but do this:
1. load up streamline display
2. switch to vectors...so far, so good
3. switch back to streamlines
4. smooth it
5. pick a different smoothing
6. now pick "None"

The data display will vanish and this message appears (which I think
you've seen as well):
"only one or two ScalarMaps to Flow per data allowed if streamlines enabled"

If you now change to Vector, then select a different smoothing type,
the streamlines appear! Then if you pick a different smoothing type,
the vectors show up!

It's all very odd...and I can't help but think more than one thing is
going "wrong" here...but I looked into FlowPlanViewControl and
PlanViewControl and DisplayImpl, and (of course) I got lost in the
woods...so I hope you can find out what's going on!

tom