bool GPortController::OnLeftButtonUp()
{
int state = _view->getState();
- if(state == HIGHLIGHTED && _isLeftClickDown)
+ if(_isLeftClickDown)
{
- _isLeftClickDown=false;
-
- if ( _vtkInteractorStyleBaseView!=NULL )
+ if(state==HIGHLIGHTED)
{
- int X,Y;
- wxVTKRenderWindowInteractor *wxVTKiren;
- wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
- wxVTKiren->GetEventPosition(X,Y);
-
int portType = ((GPortModel*)_model)->getPortType();
//Evaluate new state
if(portType==GOUTPUTPORT)
{
- _model->setChanged();
_model->notifyObservers(_id,INIT_CREATION_CONTOUR);
}
else if (portType==GINPUTPORT)
{
- _model->setChanged();
_model->notifyObservers(_id,FIN_CREATION_CONTOUR);
}
-
}
+ else
+ {
+ _view->setState(NOTHING_HAPPENS);
+ }
+ _isLeftClickDown=false;
}
return true;