]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GObjectController.cxx
Move box and refresh position ... ports don't refresh automatically their position...
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsVtkGUIEditorGraphic / GObjectController.cxx
index b053cbac0f419623328def98691cb4ff3bb0d86e..37b5de2d4ddf64067a6ed54e61cfe219614723e3 100644 (file)
@@ -74,8 +74,8 @@ bool GObjectController::OnMouseMove()
                //Evaluate new state
                if(!_model->hasChanged() && state == DRAG)
                {
-                       //MoveObject(X,Y);
-                       
+                       moveObject(X,Y);
+                       _model->setChanged();
                }
 
                if(!_model->hasChanged() && state == NOTHING_HAPPENS)
@@ -115,6 +115,7 @@ bool GObjectController::OnLeftButtonDown()
                //Evaluate new state
                if(!_model->hasChanged() && state==HIGHLIGHTED)
                {
+                       _view->isFirstDragging(true);
                        _model->setState(DRAG);
                        _model->setChanged();
                }
@@ -123,6 +124,7 @@ bool GObjectController::OnLeftButtonDown()
                {
                        if(_view->isPointInside(X,Y))
                        {
+                               _view->isFirstDragging(true);
                                _model->setState(DRAG);
                                _model->setChanged();
                        }       
@@ -199,8 +201,15 @@ bool GObjectController::OnRightButtonDown()
        }
        return true;
 }
+
 //=========================================================================
 
+void GObjectController::moveObject(int X,int Y)
+{
+       _view->moveObject(X,Y); 
+}
+
+//=========================================================================
 
 }  // EO namespace bbtk