]> Creatis software - creaContours.git/blobdiff - lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx
#3145 creaContours Bug New Normal - changeWx28to30
[creaContours.git] / lib / Interface_ManagerContour_NDimensions / wxVtkBaseView_SceneManager.cxx
index 166f8ed9a5066789c43b8dc33eb3fbe8e3b070ec..1d8f1e51659104368b0f3234d3f609dade2ee545 100644 (file)
@@ -65,25 +65,21 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
 
        wxVtkBaseView_SceneManager :: wxVtkBaseView_SceneManager( wxVtkBaseView * theWxBaseViewToManage, wxEvtHandler * theEventHandler, double * spc )
        {
-               
                _lastInteraction                                = NULL;
-               _lastInteractionName                            = "";
+               _lastInteractionName                    = "";
                _eventHandler                                   = theEventHandler;
                _leftClickCount                                 = 0;
                _rigthClickCount                                = 0;
-               
-               _contours_ViewControl                           = new std::map< std::string, ContourWrap_ViewControl * >();
-               _sceneContours_ViewControl                      = new std::map< std::string, ContourWrap_ViewControl * >();
+               _contours_ViewControl                   = new std::map< std::string, ContourWrap_ViewControl * >();
+               _sceneContours_ViewControl              = new std::map< std::string, ContourWrap_ViewControl * >();
                _workingGroup                                   = new std::map< std::string, ContourWrap_ViewControl * >();
-
                _creatingMULT_ROI                               = false;
-               _editingROI                                     = false;
-               _toIncludeAtInteractionGroup                    = false;
-               _waiting                                        = false;
+               _editingROI                                             = false;
+               _toIncludeAtInteractionGroup    = false;
+               _waiting                                                = false;
                _creatingROI                                    = false;
-               _drawingSelectionROI                            = false;
-               SetWidthContour(1.0);
-               
+               _drawingSelectionROI                    = false;
+               SetWidthContour(1.0);   
                _wxVtk_BaseView = theWxBaseViewToManage;
                if( _wxVtk_BaseView!=NULL )
                {
@@ -93,6 +89,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                }
                configureSelectionROI( spc );
        }
+
        //------------------------------------------------------------------------------------------------------------
        wxVtkBaseView_SceneManager :: ~wxVtkBaseView_SceneManager()
        {
@@ -102,7 +99,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                {
                        _contours_ViewControl->erase( iter );
                        i++;
-               }
+               } // for
                _contours_ViewControl->clear();         
                delete _contours_ViewControl;           
                _workingGroup->clear();
@@ -126,10 +123,9 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                        wxCommandEvent cevent( theEventType );
                        cevent.SetString( wxString( text.c_str(), wxConvUTF8) );
                        _eventHandler->ProcessEvent( cevent );
-               }
+               } // if
        }
 
-
        //------------------------------------------------------------------------------------------------------------
        //  Attributes getters and setters
        //------------------------------------------------------------------------------------------------------------
@@ -137,6 +133,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
        {
                _eventHandler = theEventHandler;
        }
+
        //------------------------------------------------------------------------------------------------------------
        void wxVtkBaseView_SceneManager :: setWxVtkViewBase( wxVtkBaseView * theBaseView )
        {
@@ -461,7 +458,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
        }
 
        //------------------------------------------------------------------------------------------------------------
-       void wxVtkBaseView_SceneManager :: removeSceneContours( )
+       void wxVtkBaseView_SceneManager::removeSceneContours()
        {
                std::map <std::string, ContourWrap_ViewControl *>::iterator iter = _sceneContours_ViewControl->begin(); 
                int size = _sceneContours_ViewControl->size();
@@ -471,8 +468,6 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                        iter++;
                }
                _sceneContours_ViewControl->clear();
-
-
                //Removing the selection rectangle to avoid showing when it's innecesary
                _controlerSelectionROI->SetActive( false );             
                _viewerSelectionROI->RemoveCompleteContourActor();