X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_ManagerContour_NDimensions%2FwxVtkBaseView_SceneManager.cxx;h=daa8a32088f58c2ebfe9e2b0524d1097dd0b5f88;hb=5215c72acd92c130ecf85eed75b4b74d30b0f47a;hp=0189493190fe812c3197d0f74bf5d57d8a5a7de5;hpb=fc546c3fa6dc579e173688cb0d5460af7dd668bb;p=creaContours.git diff --git a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx index 0189493..daa8a32 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx @@ -40,7 +40,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) wxVtkBaseView_SceneManager :: wxVtkBaseView_SceneManager( wxVtkBaseView * theWxBaseViewToManage, wxEvtHandler * theEventHandler, double * spc ) { - SetWidthContour(1.0); + _lastInteraction = NULL; _lastInteractionName = ""; _eventHandler = theEventHandler; @@ -57,7 +57,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) _waiting = false; _creatingROI = false; _drawingSelectionROI = false; - + SetWidthContour(1.0); _wxVtk_BaseView = theWxBaseViewToManage; if( _wxVtk_BaseView!=NULL ) @@ -241,6 +241,10 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) ContourWrap_ViewControl * wxVtkBaseView_SceneManager :: insertWrap( std::string theKeyName, manualContourBaseControler * manContourControl, manualViewBaseContour * manViewerContour ) { ContourWrap_ViewControl * newContourWrap = new ContourWrap_ViewControl(manContourControl, manViewerContour); + if(_contours_ViewControl == NULL) + { + _contours_ViewControl = new std::map< std::string, ContourWrap_ViewControl * >(); + } _contours_ViewControl->insert(std::pair ( theKeyName, newContourWrap )); return newContourWrap; } @@ -1187,7 +1191,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP ) manualViewBaseContour *cViewer; ContourWrap_ViewControl *conwraviwcont; std::map ::iterator iter; - + if (_contours_ViewControl!=NULL) { for (iter=_contours_ViewControl->begin(); iter!=_contours_ViewControl->end(); iter++ )