]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pColorBar.cxx
size of upper panel
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / pPlotter / pColorBar.cxx
index 22a156dbd03eaa594f8de7971302d456e6e012cd..d83e4d43e146606b8d9ef78a514c0b06adac22cb 100644 (file)
@@ -155,9 +155,9 @@ pColorBar :: ~pColorBar()
                                        startNode_show = showedColorPoints.front();
                                        lastNode_show = showedColorPoints.back();
                                                                        
-                                       int numberEdges = figure->getNumberEdges();
-                                       wxPoint points [4];
-                                       int i=0;
+                                       //int numberEdges = figure->getNumberEdges(); // JPRx
+                                       //wxPoint points [4]; // JPRx
+                                       //int i=0; // JPRx
                                        int a;
                                        for (a=0; a<showedColorPoints.size() && movingPointIndex==-1 ; a++ )
                                        {
@@ -363,7 +363,7 @@ pColorBar :: ~pColorBar()
        void pColorBar ::  onAddColorPoint ( wxCommandEvent& anEvent )
        {
                bool addedPoint = false;
-               double real_x = getOrientation() ? convertToRealValue( clickedX ) : convertToRealValue( clickedY );;
+               double real_x = getOrientation() ? convertToRealValue( clickedX ) : convertToRealValue( clickedY );
                wxColour selectedColor = getSelectedColour();
                if (okSelectedColor)
                {
@@ -705,7 +705,7 @@ pColorBar :: ~pColorBar()
                for (int a =0; a<showedColorPoints.size() && !deletedPoint; a++)        
                {
                        actualPoint = showedColorPoints[a];
-                       int actualX = actualPoint -> getRealX();
+                       int actualX = (int)actualPoint -> getRealX();
                        bool isInsideActual = figure -> isPointInside (convertToPixelValue(actualX), convertToPixelValue(xRealValue));
                        if( actualX == xRealValue || isInsideActual)
                        {
@@ -732,7 +732,7 @@ pColorBar :: ~pColorBar()
                for (int a =0; a<showedColorPoints.size() && !colourUpdated; a++)       
                {
                        actualPoint = showedColorPoints[a];
-                       int actualX = actualPoint -> getRealX();
+                       int actualX = (int)actualPoint -> getRealX();
                        bool isInsideActual = figure -> isPointInside (convertToPixelValue(actualX), clickedValue);
                        if( actualX == xRealValue || isInsideActual)
                        {
@@ -770,7 +770,7 @@ pColorBar :: ~pColorBar()
                        temp_dc.SetPen(wxPen( wxColour(167,165,191),1,wxSOLID  ));
                        temp_dc.DrawRectangle(0, 0, bar_height, bar_width-deviceEndMargin);
                }
-               wxPoint figPoints[4];
+               //wxPoint figPoints[4]; // JPRx
                
                if( _logicalBar -> getCount() >0)
                {
@@ -1163,11 +1163,11 @@ pColorBar :: ~pColorBar()
        */
        void pColorBar :: setRepresentedValues ( double minRealValue, double maxRealValue )
        {
-               temporalMinXToShow = minRealValue;
-               temporalMaxXToShow = maxRealValue;
+               temporalMinXToShow = (int)minRealValue;
+               temporalMaxXToShow = (int)maxRealValue;
 
-               minX_represented_Tshow = minRealValue;          
-               maxX_represented_Tshow = maxRealValue;
+               minX_represented_Tshow = (int)minRealValue;             
+               maxX_represented_Tshow = (int)maxRealValue;
                _logicalBar->setMinValue(minX_represented_Tshow);
                _logicalBar->setMaxValue(maxX_represented_Tshow);
        }