X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsVtkGUIEditorGraphic%2FGBlackBoxController.cxx;h=4554e541c77c02809c61f285c1b748d57b230f97;hb=eaf825847b9ac4bd762deafa59a7df1c2ceba433;hp=952e9a908592691254924a9227969f3e096eca3e;hpb=878ac6ad472bc459f4e364c16890e5026c401944;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.cxx index 952e9a9..4554e54 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.cxx @@ -65,26 +65,23 @@ namespace bbtk int state = _view->getState(); //Evaluate new state - if(!_model->hasChanged() && state == DRAG) + if( state == DRAG) { moveObject(X,Y); - _model->setChanged(); } - if(!_model->hasChanged() && state == NOTHING_HAPPENS) + if(state == NOTHING_HAPPENS) { if(_view->isPointInside(X,Y)) { - _view->setState(HIGHLIGHTED); - _model->setChanged(); + _view->setState(HIGHLIGHTED); } } - if(!_model->hasChanged() && state==HIGHLIGHTED) + if( state==HIGHLIGHTED) { if(!_view->isPointInside(X,Y)) { _view->setState(NOTHING_HAPPENS); - _model->setChanged(); } } @@ -109,20 +106,18 @@ namespace bbtk int state = _view->getState(); //Evaluate new state - if(!_model->hasChanged() && state==HIGHLIGHTED) + if( state==HIGHLIGHTED) { _view->isStartDragging(true); _view->setState(DRAG); - _model->setChanged(); } - if( !_model->hasChanged() && state == SELECTED) + if( state == SELECTED) { if(_view->isPointInside(X,Y)) { _view->isStartDragging(true); _view->setState(DRAG); - _model->setChanged(); } } @@ -145,16 +140,14 @@ namespace bbtk int state = _view->getState(); //Evaluate new state - if(!_model->hasChanged() && state==CLICKED) + if(state==CLICKED) { _view->setState(SELECTED); - _model->setChanged(); } - if( !_model->hasChanged() && state == DRAG) + if( state == DRAG) { _view->setState(SELECTED); - _model->setChanged(); } _model->notifyObservers(_id); @@ -193,10 +186,9 @@ namespace bbtk int state = _view->getState(); //Evaluate new state - if( !_model->hasChanged() && state == SELECTED) + if( state == SELECTED) { _view->setState(NOTHING_HAPPENS); - _model->setChanged(); } _model->notifyObservers(_id);