Skip to content

Commit 8173e5d

Browse files
committed
Fix 3DButtonRepresentation widget initialization
In the HAI demo, when initializing the widget in the rendererer, it crashed in glSelect.
1 parent b7121c3 commit 8173e5d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Libs/VTK/Widgets/msvVTKProp3DButtonRepresentation.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ void msvVTKProp3DButtonRepresentation::PlaceWidget(double bds[6])
259259
int msvVTKProp3DButtonRepresentation
260260
::ComputeInteractionState(int X, int Y, int vtkNotUsed(modify))
261261
{
262+
if (X == 0 && Y == 0)
263+
{
264+
return this->InteractionState;
265+
}
262266
this->VisibilityOn(); //actor must be on to be picked
263267
this->Picker->Pick(X,Y,0.0,this->Renderer);
264268
vtkAssemblyPath *path = this->Picker->GetPath();

0 commit comments

Comments
 (0)