X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FpPlotter%2FLogicalColorBar.cxx;h=feaf8f776dda817359931a00d4aa963b474f13af;hb=8138ced89fa9f1cc6933ff739dfa28b1e3c3883b;hp=642f0d6305e616ecbf43fac3ba009e426ae16724;hpb=c5feadbb145eecf6d73f793535b7e23eb18db2cb;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.cxx index 642f0d6..feaf8f7 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.cxx @@ -98,11 +98,11 @@ if(xRealValue>=minValue && xRealValue<=maxValue) { - bool ifContinue = true; + // bool ifContinue = true; // JPRx //pColorPoint * colorPoint, nextColorPoint; int maxIndex= logicColorPoints.size()-1; - int nextIndex = 0; - int nextX = 0; + // int nextIndex = 0; // JPRx + //int nextX = 0; // JPRx int i = 0; std::vector ::iterator iter; @@ -112,39 +112,43 @@ { logicColorPoints.push_back(newColorPoint); addedPoint = true; - } - for ( iter = logicColorPoints.begin(); i<=maxIndex && !addedPoint; iter++ ) - { - nextIter = iter; - int before = (*iter)->getRealX() ; - if(before>xRealValue && i==0) - { - //Is the first point - logicColorPoints.insert( iter, newColorPoint ); - addedPoint =true; - lastAddedPoint = newColorPoint; - } - else if(beforegetRealX(); - if( before < xRealValue && after> xRealValue) + nextIter = iter; + int before = (*iter)->getRealX() ; + if(before>xRealValue && i==0) + { + //Is the first point + logicColorPoints.insert( iter, newColorPoint ); + addedPoint =true; + lastAddedPoint = newColorPoint; + } + else if(beforegetRealX(); + if( before < xRealValue && after> xRealValue) + { + logicColorPoints.insert( nextIter, newColorPoint ); + addedPoint =true; + lastAddedPoint = newColorPoint; + } + } + //std::cout<<"JCPaddColorPoint iterator "<<*iter<