]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualContourBaseControler.cpp
index 519061ddd9f204766b38d6d4e774367228b40e3c..0639b0c611e012aecb665b68f660aeae0fcafe3a 100644 (file)
@@ -226,6 +226,7 @@ bool manualContourBaseControler::OnRightButtonDown()
 
                SetCompleteCreation( true );
                SetKeyBoardMoving( false );
+               this->GetManualContourModel()->SetCloseContour(true);
                MouseClickRight(X,Y);
        }
        return true;
@@ -236,13 +237,13 @@ bool manualContourBaseControler::OnRightButtonUp()
        return true;
 }
 // ----------------------------------------------------------------------------
-void manualContourBaseControler::SetModelView(manualContourModel *manContModel, manualViewBaseContour *manViewBaseCont){
+void manualContourBaseControler::SetModelView(manualBaseModel *manContModel, manualViewBaseContour *manViewBaseCont){
        _manContModel           =       manContModel;
        _manViewBaseCont        =       manViewBaseCont;
        _manViewBaseCont->SetEditable( &_editable );
 }
 // ----------------------------------------------------------------------------
-manualContourModel* manualContourBaseControler::GetManualContourModel()
+manualBaseModel* manualContourBaseControler::GetManualContourModel()
 {
        return _manContModel;
 }
@@ -288,10 +289,13 @@ void manualContourBaseControler::MouseDLeft(int x, int y )
 {
        if (_state==0)
        {
+               
                int z=GetZ();
-               GetManualViewBaseContour()->SelectPosibleContour(x,y,z);
-               GetManualViewBaseContour()->SelectPosiblePoint(x,y,z);
-               if ( GetManualViewBaseContour()->GetPosibleSelected() )
+               bool temp = _manViewBaseCont->SelectPosibleContour(x,y,z);
+
+               _manViewBaseCont->SelectPosiblePoint(x,y,z);
+
+               if ( _manViewBaseCont->GetPosibleSelected() )
                {
                        _editable = true;
                }
@@ -422,7 +426,7 @@ void manualContourBaseControler::Magnet(int x, int y)
                        double  xx      = x;
                        double  yy      = y;
                        double  zz      = GetZ();
-                       GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+                       GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                        int                     id      = GetManualContourModel()->GetIdPoint(xx,yy,zz,32000,-1);
                        if (id!=-1)
                        {
@@ -452,7 +456,7 @@ void manualContourBaseControler::AddPoint(int x, int y, int z) // virtual
                double  xx      = x;
                double  yy      = y;
                double  zz      = z;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                /*int   id              =*/  GetManualContourModel()->AddPoint(xx,yy,zz);  // JPRx
                GetManualViewBaseContour()->AddPoint();
 //             GetManualViewBaseContour()->UpdateViewPoint(id);
@@ -467,7 +471,7 @@ void manualContourBaseControler::InsertPoint(int x,int y,int z)  // virtual
                double                          xx              = x;
                double                          yy              = y;
                double                          zz              = z;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                if (GetManualContourModel()->GetSizeLstPoints()>1){
                        id = GetManualContourModel()->InsertPoint(xx,yy,zz);
                        GetManualViewBaseContour()->InsertPoint(id);
@@ -487,7 +491,7 @@ void manualContourBaseControler::SetPoint( int id ,int x , int y , int z){ // vi
                double xx = x;
                double yy = y;
                double zz = z;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                manualPoint             *mp             = _manContModel->GetManualPoint(id);
                mp->SetPoint(xx,yy,zz);
                GetManualViewBaseContour()->UpdateViewPoint(id);
@@ -499,7 +503,7 @@ void manualContourBaseControler::SetPointX( int id ,int x  ){
                double xx = x;
                double yy = 0;
                double zz = 0;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                manualPoint             *mp             = _manContModel->GetManualPoint(id);
                mp->SetPointX(xx);
                GetManualViewBaseContour()->UpdateViewPoint(id);
@@ -511,7 +515,7 @@ void manualContourBaseControler::SetPointY( int id ,int y  ){
                double xx = 0;
                double yy = y;
                double zz = 0;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                manualPoint             *mp             = _manContModel->GetManualPoint(id);
                mp->SetPointY(yy);
                GetManualViewBaseContour()->UpdateViewPoint(id);
@@ -523,7 +527,7 @@ void manualContourBaseControler::SetPointZ( int id ,int z  ){
                double xx = 0;
                double yy = 0;
                double zz = z;
-               GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
+               GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
                manualPoint             *mp             = _manContModel->GetManualPoint(id);
                mp->SetPointZ(zz);
                GetManualViewBaseContour()->UpdateViewPoint(id);