Text annotation objects might need to behave more like legend annotation objects
Describe the bug
- Create 3 different databases from arbitrary but distinctly different subsets of the
waveXXXX.silofiles. - Put up PC plot of
pressurefromwaveA.siloand Mesh plot fromwaveB.silo - Draw plots
- Add text annotation for
$timeand confirm it displays time of first database of first plot in plot list - Change order of plots in plot list and watch value for
$timeannotation change
Somehow, the text annotation object is getting what it knows about the database only from the first entry in the plot list. I think the solution is for it to track which plot its associated with in the plot list. Looking here...
https://github.com/visit-dav/visit/blob/9d76188e4f5f9169709e9c0cf274209dbeca13e2/src/avt/VisWindow/Colleagues/avtAnnotationWithTextColleague.C#L76
Its obviously only using plot list entry 0. But, what plot...the plot's index at the time the annotation object was created? The plot's type...the plot`s database/variable name. The latter might be best so it could find which entry to query in the plot list to update its value.
I think what we need is a printable form way of identifying plots. Currently, plots are identified by and large within a VisIt session as an index into a list of plots. But, because plots are added and deleted and can even be re-ordered in the plot list, an index into the list is an unreliable way to identify a plot.
We could compute a hash of all relevant stuff that goes into a plot...the database, variable name, plot attributes, attributes of any operators applied, etc. Whenever anything about the plot changes, that hash would change...does that mean the plot itself is a different thing than it was before the change?
From the point of view of identifying the C++ object within a VisIt session, such an approach is overkill and leads to far too many instances where the identifer changes for the same C++ object instance. OTOH, in such an approach the same plot created in two different instances of VisIt would have the same id and maybe that is a good thing?
Could we just use the C++ plot object's pointer as its id? That certainly would not work across session saves and restores?