SetInteractor( vtkRenderWindowInteractor* rwi )
{
this->Superclass::SetInteractor( rwi );
- TBaseStyle* s = dynamic_cast< TBaseStyle*>( rwi->GetInteractorStyle( ) );
- if( s != NULL )
+ if( rwi != NULL )
{
- s->AddMouseClickCommand( Self::_Click, this );
- s->AddMouseDoubleClickCommand( Self::_DoubleClick, this );
+ TBaseStyle* s =
+ dynamic_cast< TBaseStyle* >( rwi->GetInteractorStyle( ) );
+ if( s != NULL )
+ {
+ s->AddMouseClickCommand( Self::_Click, this );
+ s->AddMouseDoubleClickCommand( Self::_DoubleClick, this );
+
+ } // fi
} // fi
}
)
{
SeedWidget* self = reinterpret_cast< SeedWidget* >( data );
+ if( self == NULL )
+ return;
if( self->WidgetState == vtkSeedWidget::MovingSeed )
return;