]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp
#3323 creaMaracasVisu Feature New Normal - label2 for manal contours
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualViewContour.cpp
index 32ef7e736c9ba79a7d34e59b06b86d37e5162066..e279664f794d5b9b7fe8e2b620069c30d9b0593a 100644 (file)
@@ -186,7 +186,6 @@ void manualViewContour::RefreshContour() // virtual
 // ----------------------------------------------------------------------------
 void manualViewContour::RefreshText()  // virtual
 {
-
        if ((_textActor!=NULL) && ( _textActor->GetProperty()->GetOpacity()!=0 )){
                int size = GetNumberOfPoints();
                char text[50];
@@ -195,13 +194,13 @@ void manualViewContour::RefreshText()  // virtual
                char resultText2[250];
                strcpy(resultText2, "000");
                double spcP[3];
-               spcP[0]=1;
-               spcP[1]=1;
-               spcP[2]=1;
+               spcP[0] = 1;
+               spcP[1] = 1;
+               spcP[2] = 1;
 
 //CMRU 19-08-09 ----------------------------------
-               std::string label;
-               label = _manContModel->GetLabel();
+               std::string label       = _manContModel->GetLabel();
+               std::string label2      = " (" + _manContModel->GetLabel2() + "z) ";
 // ------------------------------------
        
                if (size==2)
@@ -257,9 +256,9 @@ void manualViewContour::RefreshText()  // virtual
                                gcvt ( this->_manContModel->GetPathSize( _spc ), 5, text );
                                strcat(resultText2,text);
                                strcat(resultText2,"u");
-
                        }
 //CMRU 19-08-09 ----------------------------------
+                       strcat(resultText,label2.c_str());
                        strcat(resultText,label.c_str());
 //------------------------------------------------
                }
@@ -267,32 +266,28 @@ void manualViewContour::RefreshText()  // virtual
                _textActor->SetInput(resultText);
                _textActor2->SetInput(resultText2);
                
-               if (size>=1){
-
+               if (size>=1)
+               {
                        int i;
                        for (i=0; i<size; i++)
                        {
                                if (_lstViewPoints[i]->GetPosibleSelected()==true)
                                {
                                        _id_viewPoint_for_text = i;
-                               }
-                       }
-
+                               } // if
+                       } // for
                        if (_id_viewPoint_for_text>=size) 
                        {
-                               _id_viewPoint_for_text=0;
-                       }
-                       
+                               _id_viewPoint_for_text = 0;
+                       }// if
                        double px = _manContModel->GetManualPoint(_id_viewPoint_for_text)->GetX();
                        double py = _manContModel->GetManualPoint(_id_viewPoint_for_text)->GetY();
-
                        //EED 27 sep 2006
-                       px=px*_spc[0];
-                       py=py*_spc[1];
-
+                       px = px*_spc[0];
+                       py = py*_spc[1];
                        _textActor->SetPosition(px+GetRange()+1,py);
                        _textActor2->SetPosition(px+GetRange()+1,py+2);
-               }
+               } // if size
        }
 }