]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GPortController.cxx
Stable version ... The connection is correctly painted :)
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsVtkGUIEditorGraphic / GPortController.cxx
index 66106085a683f60769a45836828ee37fd2c217f4..e2203ce8fd09136b278347d8de868a9f7244496b 100644 (file)
@@ -77,32 +77,27 @@ namespace bbtk
        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;