From 5215c72acd92c130ecf85eed75b4b74d30b0f47a Mon Sep 17 00:00:00 2001 From: Frederic Cervenansky Date: Thu, 10 Feb 2011 14:19:10 +0000 Subject: [PATCH] initialisation bug --- .../wxVtkBaseView_SceneManager.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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++ ) -- 2.47.1