]> Creatis software - bbtkGEditor.git/commitdiff
v1.1.0 BUG: 1402
authordavila <>
Sun, 3 Jun 2012 13:45:06 +0000 (13:45 +0000)
committerdavila <>
Sun, 3 Jun 2012 13:45:06 +0000 (13:45 +0000)
  - Erase all selected boxes

lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx

index 7a3498b215efe1423e1054427c4700d3c6b4136b..cd6e44337e9cd14b0e0f60463c52b9a53866f7d3 100644 (file)
@@ -1059,6 +1059,7 @@ bool wxVtkSceneManager::OnLeftDClick() {
 bool wxVtkSceneManager::OnChar() 
 {
        bool ok=false;
+       bool oktmp;
        char keyCode    = _vtkInteractorStyleBaseView->GetInteractor()-> GetKeyCode();
        int ctrlkey             = _vtkInteractorStyleBaseView->GetInteractor()->GetControlKey();
         
@@ -1069,11 +1070,12 @@ bool wxVtkSceneManager::OnChar()
                        for (int i = 0; i < (int) _selectedObjects.size(); i++) 
                        {
                                int id = _selectedObjects[i];
-                               printf("EED wxVtkSceneManager::OnChar %d %d\n", i, id);
                                std::map<int, GObjectController*>::iterator it;
                                it = _controllers.find(id);
-                               if (it != _controllers.end()) {
-                                       ok=ok||deleteObject(id);
+                               if (it != _controllers.end()) 
+                               {
+                                       oktmp   =       deleteObject(id);
+                                       ok              =       ok||oktmp;
                                } // if
                        }// for selected objects                
                        if (ok) _selectedObjects.clear();
@@ -1127,7 +1129,6 @@ bool wxVtkSceneManager::deleteObject(int id)
        bool result=true;
        GObjectController *control = _controllers[id];
        std::vector<int> controllersToRemove;
-
        if (control->getGObjectType() == GBLACKBOX || control->getGObjectType()
                        == GCOMPLEXINPUTPORT || control->getGObjectType()
                        == GCOMPLEXOUTPUTPORT) {