vtkBoxRepresentation always highlights first selected face
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
vtkBoxWidget2 / vtkBoxRepresentation
When I select and move a face, this face gets highlighted. When I move a different face later on, always the first selected face gets highlighted.
This fixed face can be reset by disabling/re-enabling the widget, so I suspect some internal pipeline doesn't get updated properly. However, the following change in vtkBoxRepresentation::HighlightFace(int cellId) fixes the issue for me
diff --git a/Interaction/Widgets/vtkBoxRepresentation.cxx b/Interaction/Widgets/vtkBoxRepresentation.
index e2fc1ee..f6c583c 100644
--- a/Interaction/Widgets/vtkBoxRepresentation.cxx
+++ b/Interaction/Widgets/vtkBoxRepresentation.cxx
@@ -1282,8 +1282,8 @@ void vtkBoxRepresentation::HighlightFace(int cellId)
vtkIdType *pts;
vtkCellArray *cells = this->HexFacePolyData->GetPolys();
this->HexPolyData->GetCellPoints(cellId, npts, pts);
- this->HexFacePolyData->Modified();
cells->ReplaceCell(0,npts,pts);
+ cells->Modified();
this->CurrentHexFace = cellId;
this->HexFace->SetProperty(this->SelectedFaceProperty);
if ( !this->CurrentHandle )