Commit 3bd74ae7 authored by bonnell's avatar bonnell

Fix bug applying named selection when 'Auto apply updated selections' was...

Fix bug applying named selection when 'Auto apply updated selections' was selected before selection was applied to a plot.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@22809 18c085ea-50e0-402c-830e-de6fd14e8384
parent 583de6e3
......@@ -27,6 +27,7 @@ list of changes in release 2.6.</p>
<li>Creating database correlations on Windows from the CLI, when databases are opened using relative paths, has been fixed.</li>
<li>Session files with time varying data can be restored via CLI with different sources and have their time sliders work correctly.</li>
<li>An engine crash on Windows when cmfe expressions were passed an invalid filename.</li>
<li>A plot got put in perpetual 'pending' state when NamedSelections' 'Automatially apply updated selections' was checked before the selection had been applied to a plot.</li>
</ul>
<p><b><font size="4">Enhancements in version 2.7.2</font></b></p>
......
......@@ -6661,6 +6661,11 @@ ViewerPlotList::InterruptUpdatePlotList()
// we do any plots that generate a named selection then we update the
// named selection, causing plots that use it to be regenerated.
//
// Kathleen Biagas, Fri Feb 7 09:59:06 PST 2014
// Loop variable 'id' was overshadowing 'id' declared just before the loop,
// preventing loop from being executed the correct number of times when
// originatingPlot gets set to true.
//
// ****************************************************************************
bool
......@@ -6674,12 +6679,12 @@ ViewerPlotList::UpdatePlots(const intVector &somePlots, bool animating)
//
int nOrder(2 * somePlots.size());
int *order = new int[nOrder];
for(size_t id = 0; id < nOrder; ++id)
order[id] = -1;
for(size_t i = 0; i < nOrder; ++i)
order[i] = -1;
int id = 0, id2 = (int)somePlots.size();
for (size_t id = 0; id < somePlots.size(); ++id)
for (size_t i = 0; i < somePlots.size(); ++i)
{
int i = somePlots[id];
int pid = somePlots[i];
bool originatingPlot = false;
if(ViewerWindowManager::GetSelectionList()->GetAutoApplyUpdates())
{
......@@ -6687,7 +6692,7 @@ ViewerPlotList::UpdatePlots(const intVector &somePlots, bool animating)
for(int j = 0; j < sList->GetNumSelections(); ++j)
{
if(sList->GetSelections(j).GetOriginatingPlot() ==
plots[i].plot->GetPlotName())
plots[pid].plot->GetPlotName())
{
originatingPlot = true;
break;
......@@ -6698,11 +6703,11 @@ ViewerPlotList::UpdatePlots(const intVector &somePlots, bool animating)
if(originatingPlot)
{
// This plot generates a named selection and we're auto applying changes.
order[id++] = i;
order[id++] = pid;
}
else
{
order[id2++] = i;
order[id2++] = pid;
}
}
......
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