]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GObjectController.cxx
*** empty log message ***
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsVtkGUIEditorGraphic / GObjectController.cxx
index fba50c45ef59811a2b094e1db6af6f881e34bd65..8fc721c2b78c87082e5ac8b529349562a2e58a4e 100644 (file)
@@ -66,7 +66,7 @@ bool GObjectController::OnMouseMove()
        {
                int X,Y;
                wxVTKRenderWindowInteractor *_wxVTKiren;
-               _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
+               _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
                _wxVTKiren->GetEventPosition( X , Y );
 
                int state  = _model->getState();
@@ -87,11 +87,18 @@ bool GObjectController::OnMouseMove()
                {
                        if(_view->isPointInside(X,Y))
                        {
-                               _model->setState(HIGHLIGHTED);                          
+                               _model->setState(HIGHLIGHTED);                  
+                       }                       
+               }
+               if(state==HIGHLIGHTED)
+               {
+                       if(!_view->isPointInside(X,Y))
+                       {
+                               _model->setState(NOTHING_HAPPENS);                      
                        }
                }
                
-               _view->refresh();
+               _view->update();
        }
        return true;
 }
@@ -103,7 +110,7 @@ bool GObjectController::OnLeftButtonDown()
        {
                int X,Y;
                wxVTKRenderWindowInteractor *wxVTKiren;
-               wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
+               wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition(X,Y);
 
                //MouseClickLeft(X,Y);