Commit c32db8ab authored by whitlocb's avatar whitlocb
Browse files

I changed how operators get added to new plots. I also made new windows get...

I changed how operators get added to new plots. I also made new windows get the open database so they can create plots immediately after creation.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@13520 18c085ea-50e0-402c-830e-de6fd14e8384
parent 0272556e
......@@ -37,6 +37,7 @@ enhancements and bug-fixes that were added to this release.</p>
<li>VisIt's filters can now cache intermediate results for later use. Contours and streamlines should be faster after the first execution.</li>
<li>Lineouts can now be directly calculated (i.e. without having to make a Pseudocolor plot to extract a Lineout from). You can access this feature by making a Curve plot of a scalar listed under operators/Lineout.</li>
<li>VisIt now has a "-safe" mode. This mode will tell you if your data has NaNs, infs, or bad connectivity. Access this mode by adding "-safe" to VisIt's invocation. (This mode is not the default because it incurs a performance penalty.)</li>
<li>The manner in which operators are copied from existing plots to new plots has changed. The new behavior copies operators from the first selected plot instead of always copying operators from the first plot.</li>
</ul>
<a name="Advanced_Features"></a>
......@@ -126,7 +127,7 @@ enhancements and bug-fixes that were added to this release.</p>
<li>A bug was fixed when creating ghost data for 2D rectilinear or AMR data sets. This bug manifested itself by causing domains or patches to disappear when you removed materials or contoured the data set (among other operations).</li>
<li>A bug was fixed where creating a Contour plot after a Pseudocolor plot was causing AMR data sets to be mishandled. (Extra geometry showed up that should have been removed.)</li>
<li>VisIt can again read mixed material variables from simulations.</li>
<li></li>
<li>New windows are now able to create plots from the active source.</li>
<li></li>
<li></li>
<li></li>
......
......@@ -3318,6 +3318,10 @@ ViewerPlotList::SimpleAddPlot(ViewerPlot *plot, bool replacePlots)
// Brad Whitlock, Tue Apr 29 15:58:55 PDT 2008
// Added tr().
//
// Brad Whitlock, Thu Jan 13 22:44:08 PST 2011
// Use the first active plot as the source of operators instead of using
// the first plot all the time.
//
// ****************************************************************************
ViewerPlot *
......@@ -3444,16 +3448,30 @@ ViewerPlotList::NewPlot(int type, const EngineKey &ek,
ENDTRY
//
// Apply the same operators that are on the old plot to the new plot.
// Apply the same operators that are on the first active plot to
// the new plot.
//
if (plot && applyOperators && (nPlots > 0))
{
for (int j = 0; j < plots[0].plot->GetNOperators(); ++j)
// Find the index of the first active plot.
int firstActive = -1;
for(int j = 0; j < nPlots; ++j)
{
if(plots[j].active)
{
firstActive = j;
break;
}
}
firstActive = (firstActive < 0) ? 0 : firstActive;
// Apply the first active plot's operators
for (int j = 0; j < plots[firstActive].plot->GetNOperators(); ++j)
{
ViewerOperator *op = plots[0].plot->GetOperator(j);
plot->AddOperator(op->GetType());
ViewerOperator *newOp = plot->GetOperator(j);
newOp->SetOperatorAtts(op->GetOperatorAtts());
ViewerOperator *op = plots[firstActive].plot->GetOperator(j);
plot->AddOperator(op->GetType());
ViewerOperator *newOp = plot->GetOperator(j);
newOp->SetOperatorAtts(op->GetOperatorAtts());
}
}
......
......@@ -547,6 +547,9 @@ ViewerWindowManager::SetGeometry(const char *windowGeometry)
// Brad Whitlock, Fri Aug 13 16:36:28 PDT 2010
// Fix legend renaming.
//
// Brad Whitlock, Thu Jan 13 22:56:32 PST 2011
// I applied Cyrus' suggested fix for copying the sources. Looks good.
//
// ****************************************************************************
void
......@@ -567,22 +570,29 @@ ViewerWindowManager::AddWindow(bool copyAtts)
//
// Copy attributes.
//
if ((copyAtts || clientAtts->GetCloneWindowOnFirstRef()) &&
(windowIndex != activeWindow))
if (windowIndex != activeWindow)
{
ViewerWindow *dest = windows[windowIndex];
ViewerWindow *src = windows[activeWindow];
dest->CopyGeneralAttributes(src);
dest->CopyAnnotationAttributes(src);
dest->CopyLightList(src);
dest->CopyViewAttributes(src);
if (copyAtts || clientAtts->GetCloneWindowOnFirstRef())
{
dest->CopyGeneralAttributes(src);
dest->CopyAnnotationAttributes(src);
dest->CopyLightList(src);
dest->CopyViewAttributes(src);
StringStringMap nameMap = dest->GetPlotList()->CopyFrom(src->
GetPlotList(), true);
dest->GetActionManager()->CopyFrom(src->GetActionManager());
dest->CopyAnnotationObjectList(src, nameMap, true);
StringStringMap nameMap = dest->GetPlotList()->CopyFrom(src->
GetPlotList(), true);
dest->GetActionManager()->CopyFrom(src->GetActionManager());
dest->CopyAnnotationObjectList(src, nameMap, true);
}
else
{
// We always want to copy the active sources -- but not
// the plots themselves.
dest->GetPlotList()->CopyFrom(src->GetPlotList(), false);
}
}
referenced[windowIndex] = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment