- return true;
-}
-//=========================================================================
-bool GObjectController::OnLeftButtonUp()
-{
+ if ( _vtkInteractorStyleBaseView!=NULL )
+ {
+ int X,Y;
+ wxVTKRenderWindowInteractor *wxVTKiren;
+ wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
+ wxVTKiren->GetEventPosition(X,Y);
+
+ int state = _model->getState();
+
+ //Evaluate new state
+ if(!_model->hasChanged() && state==CLICKED)
+ {
+ _model->setState(SELECTED);
+ }
+
+ if( !_model->hasChanged() && state == DRAG)
+ {
+ _model->setState(SELECTED);
+ }
+
+ _model->notifyObservers();