]> Creatis software - creaContours.git/blobdiff - lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx
Version with out wxEventHandler
[creaContours.git] / lib / Interface_ManagerContour_NDimensions / wxVtkBaseView_SceneManager.cxx
index 383fc7995639dc937f70fb1d3fe4757419aa9d91..7fe68cbaeb4aa7a5d09ea6ed6ac7937b22ca1898 100644 (file)
@@ -250,6 +250,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                std::map<std::string, ContourWrap_ViewControl *> :: iterator iter;
                iter = _contours_ViewControl->find( theName );
                return iter->second;
+               //return iter->first;
        }
        //------------------------------------------------------------------------------------------------------------
        ContourWrap_ViewControl * wxVtkBaseView_SceneManager :: getContourWrap_ViewControlOf ( std::string theName, std::map<std::string, ContourWrap_ViewControl *> * theMap )
@@ -1201,3 +1202,31 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                        cViewer->SetWidthLine(_widthOfContour);
                }
        }
+
+       bool wxVtkBaseView_SceneManager::isEditableCControler(std::string theKeyName){
+               
+               ContourWrap_ViewControl* ccon = getContourWrap_ViewControlOf(theKeyName);
+               if(ccon != NULL ){
+                       manualContourBaseControler* cControler = ccon->getControler();
+                       if(cControler != NULL && cControler->IsEditable() == false){
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+       void wxVtkBaseView_SceneManager::deleteCViewerCControler(std::string theKeyName){
+               
+
+               ContourWrap_ViewControl* ccon = getContourWrap_ViewControlOf(theKeyName);
+
+               manualViewBaseContour                   * cViewer = ccon->getViewer();
+               manualContourBaseControler      * cControler = ccon->getControler();
+
+               removeFromScene(theKeyName);
+               removeWrap(theKeyName);
+
+               delete cViewer;         
+               delete cControler;
+       }
+               
\ No newline at end of file