ChartXY selection node field and content type not set
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
When a new selection is made in vtkChartXY, there are sometimes problems using the annotation link in other charts because the selection node content and field types are not being set. Here is the patch that's been working for me (following the pattern in vtkChartParallelCoordinates):
diff --git a/Charts/vtkChartXY.cxx b/Charts/vtkChartXY.cxx index e439da0..bd46c2c 100644 --- a/Charts/vtkChartXY.cxx +++ b/Charts/vtkChartXY.cxx @@ -1169,6 +1169,8 @@ bool vtkChartXY::MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse) vtkSelection* selection = vtkSelection::New(); vtkSelectionNode* node = vtkSelectionNode::New(); selection->AddNode(node);
-
node->SetContentType(vtkSelectionNode::INDICES);
-
node->SetFieldType(vtkSelectionNode::POINT); node->SetSelectionList(plot->GetSelection()); this->AnnotationLink->SetCurrentSelection(selection); node->Delete();