[vtk-developers] ChartParallelCoordinates clearing AxesSelections on resize

Eric E. Monson emonson at cs.duke.edu
Mon Sep 20 16:02:06 EDT 2010


Hey,

In vtkChartParallelCoordinates the red boxes that show selection ranges are stored in this->Storage->AxesSelections. This gets cleared on every call to Update(), and I think this is a bit too aggressive since they end up being cleared even when the window is just resized. 

I'm having some trouble deciding on what test to use, though. Maybe something like this (attached) that (I think) tests whether the data has been changed more recently than the chart was rebuilt?

Thanks,
-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group

==============================================
diff --git a/Charts/vtkChartParallelCoordinates.cxx b/Charts/vtkChartParallelCoordinates.cxx
index 0e17b6d..74b3cac 100644
--- a/Charts/vtkChartParallelCoordinates.cxx
+++ b/Charts/vtkChartParallelCoordinates.cxx
@@ -142,7 +142,11 @@ void vtkChartParallelCoordinates::Update()
       }
     axis->SetTitle(this->VisibleColumns->GetValue(i));
     }
-  this->Storage->AxesSelections.clear();
+
+  if (table->GetMTime() > this->BuildTime)
+    {
+    this->Storage->AxesSelections.clear();
+    }
 
   this->Storage->AxesSelections.resize(this->Storage->Axes.size());
   this->GeometryValid = false;





More information about the vtk-developers mailing list