]> Creatis software - creaContours.git/blobdiff - lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
*** empty log message ***
[creaContours.git] / lib / Interface_ManagerContour_NDimensions / wxContourMainFrame.cxx
index bbee55dfafe9f64bc2523254c2df1512fac714da..42ba17cee9f68d21ac81d31c038d0454e38e9263 100644 (file)
@@ -314,6 +314,14 @@ void wxContourMainFrame::onCreateContourCircle( ){
        //JCP 20-10-08 Undo redo implementation 
        createContour( 3 );
 }
+
+void wxContourMainFrame::onCreateContourLine( ){
+    //JCP 20-10-08 Undo redo implementation
+       saveState();
+       //JCP 20-10-08 Undo redo implementation 
+       createContour( 6 );
+}
+
 //------------------------------------------------------------------------------------------------------------
 
 void wxContourMainFrame :: onCreateContourBullEye(wxPanel* panel )
@@ -637,6 +645,7 @@ void wxContourMainFrame::onCopy(){
        _performingOperation->setStartOperationInstantVector( tempVector );
        _performingOperation->setKeyNamesOperationElems( currentSelection );
 }
+
 void wxContourMainFrame::onPaste(){
 
 
@@ -864,6 +873,7 @@ void wxContourMainFrame::onSegmentationOneSlice(int isovalue,int sampling,int me
        RefreshInterface();
 }
 
+
 void wxContourMainFrame::SegmentationOneSlice( int x, int y, int z, int isovalue, int sampling, int method )
 {              
        int typeofcontour = 1;
@@ -1067,6 +1077,37 @@ void wxContourMainFrame::onSegmentationAllSlice(int minZ,int maxZ,int isovalue,i
        RefreshInterface();
 }
 
+void wxContourMainFrame::onMirror()
+{
+       //AD:02-09
+       std::vector<std::string> currentSelection = _theViewPanel->getSelectedObjects();
+
+       std::vector<int> tempVector;
+       _instantPanel->getInstant( tempVector );
+    _performingOperation->reset();
+       _performingOperation->setStartCommand( COPY );
+       _performingOperation->setStartOperationInstantVector( tempVector );
+       _performingOperation->setKeyNamesOperationElems( currentSelection );
+
+       //AD:02-09
+       char theStartCommand = _performingOperation->getStartCommand();
+       if (  theStartCommand == COPY )
+       {
+               //JCP 20-10-08 Undo redo implementation
+               saveState();
+               //JCP 20-10-08 Undo redo implementation
+               std::vector<int> tempVector;
+               _instantPanel->getInstant( tempVector );
+               _performingOperation->setEndOperationInstantVector ( tempVector );
+               std::vector<std::string> elems = _performingOperation->getKeyNamesOperationElems();
+               int i,size = elems.size();                      
+               for( i=0; i<size; i++ )
+               {                               
+                       createCopyContourOf( elems[i], tempVector, i>0 );
+               }               
+       }
+}
+
 void wxContourMainFrame::showAxis(bool show){
        _theViewPanel->SetVisibleAxis(show);
        _theViewPanel->Refresh();