HighlightSelection example not rendering properly

This is in regards to the Cxx example HighlightSelection which can be found at


When you select cells the user does not see those cells highlighted. If you switch to wireframe mode and then back you can now see the highlighted cells. If I add this manual method in code to the example via

Code fragment from class HighlightInteractorStyle : public vtkInteractorStyleRubberBandPick



then the user gets to see what is highlighted without manually switching. If you highlight in wireframe mode the wires are highlighted. The problem only occurs in the surface mode. I have also seen (almost similar problems in the CellPicking example).

I am using the latest vtk compiled from source on a mac. Is anyone also seeing this problem? My fix is clearly a hack. I am interested in a better solution.

Well, I went back looking through the code and noticed that the following line was included


just after the color was set for the SelectedActor. This appears to be the issue and so my hack above was essentially undoing this “feature”. So the above should be removed from the example to make it work the way in which I was expecting