Commit 82aee804 authored by Kyle Lutz's avatar Kyle Lutz

Only allow selection on visible blocks

This updates the composite poly data mapper to only allow
selections for visible blocks.

Change-Id: Ib971062717dcb056e65f0adc42ff012d9892c0bf
parent cf061569
......@@ -44,6 +44,7 @@ vtkCompositePolyDataMapper2::vtkCompositePolyDataMapper2()
selectionPainter->SetDelegatePainter(this->SelectionPainter);
this->SetSelectionPainter(selectionPainter);
selectionPainter->FastDelete();
this->SelectionCompositePainter = selectionPainter;
}
//----------------------------------------------------------------------------
......@@ -201,6 +202,13 @@ void vtkCompositePolyDataMapper2::SetCompositeDataDisplayAttributes(
compositePainter->
SetCompositeDataDisplayAttributes(this->CompositeAttributes);
}
// set composite display attributes on the selection painter
if(this->SelectionCompositePainter)
{
this->SelectionCompositePainter->
SetCompositeDataDisplayAttributes(this->CompositeAttributes);
}
}
}
......
......@@ -85,6 +85,8 @@ protected:
// Composite data set attributes.
vtkSmartPointer<vtkCompositeDataDisplayAttributes> CompositeAttributes;
vtkPainter* SelectionCompositePainter;
private:
vtkCompositePolyDataMapper2(const vtkCompositePolyDataMapper2&); // Not implemented.
void operator=(const vtkCompositePolyDataMapper2&); // Not implemented.
......
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