]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp
#3533 Update Curent contour and actual point ShowNPoints in Undo Redo
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualViewBaseContour.cpp
index b5b93b431c101905787bbadcf1d4774fbe8046f0..c2008f43cc50e483e2e7f98e8bcdf6c08494a9a2 100644 (file)
@@ -587,32 +587,49 @@ bool manualViewBaseContour::SelectPosibleContour(int x, int y, int z)
        bool result=false;
        SetPosibleSelected(result);
     int id = GetIdPoint(x,y,z);
-       
-       if( !GetEditable() && !_selected && id!= -1)
-       {
-               result=true;
-               _posibleSelected=true;          
-       }
-       else
+
+/* EED 2023-07-29
+    if( !GetEditable() && !_selected && id!= -1)
        {
-               if ( (GetEditable()==true) && (id==-1 ) && (this->_lstViewPoints.size()>=2) )
+               result           = true;
+               _posibleSelected = true;
+       }else{
+        if ( (GetEditable()==true) && (id==-1 ) && (this->_lstViewPoints.size()>=2) )
                {
                        if (ifTouchContour(x,y,z)==true)
                        {
-                               result=true;
+                               result = true;
                                SetPosibleSelected(result);
-                       }
+                       } // ifTouchContour
                }
-
                if (GetEditable()==false)
                {
                        if (ifTouchContour(x,y,z)==true)
                        {
-                               result=true;
+                               result = true;
                                SetPosibleSelected(result);
-                       }
-               }
-       }
+                       } // ifTouchContor
+               } // if GetEditable
+       } // if !GetEditable() && !_selected && id!= -1
+*/
+
+       if ( (GetEditable()==true) && (id==-1 ) && (this->_lstViewPoints.size()>=2) )
+            {
+                if (ifTouchContour(x,y,z)==true)
+                {
+                    result = true;
+                    SetPosibleSelected(result);
+                } // ifTouchContour
+            }
+            if (GetEditable()==false)
+            {
+                if (ifTouchContour(x,y,z)==true)
+                {
+                    result = true;
+                    SetPosibleSelected(result);
+                } // ifTouchContor
+            } // if GetEditable
+    
        return result;
 }
 // ----------------------------------------------------------------------------
@@ -632,7 +649,8 @@ void manualViewBaseContour::UnSelectLstPoints(){
 // ----------------------------------------------------------------------------
 void manualViewBaseContour::UnSelectAllPoints(){
        int i,size=_lstViewPoints.size();
-       for (i=0;i<size;i++){
+       for (i=0;i<size;i++)
+    {
                UnSelectPoint(i);
        }
        Refresh();