From: adv Date: Thu, 19 May 2016 13:16:19 +0000 (+0300) Subject: USUL Internal 0003908: 'Third dimension's of cloud of points visualization' functiona... X-Git-Tag: CTH_2_2_b~10^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fc0f04e521625704367f08506da9caaf2674cd30;p=modules%2Fgui.git USUL Internal 0003908: 'Third dimension's of cloud of points visualization' functionality works incorrect. --- diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 19bebf92d..0b48ae2f2 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -2162,27 +2162,26 @@ void Plot2d_PlotCurve::drawSymbols( QPainter *p, const QwtSymbol &symbol, } else { - double aTail = 0.0; + double aTail = 1.0; for ( int i = from; i <= to; i++ ) { double u1 = xMap.transform( x( i ) ); double v1 = yMap.transform( y( i ) ); - if ( (i == from || i == to) && myNbMarkers >= 0 ) + if ( !mySymbolsColorMap.isEmpty() ) { - if (!mySymbolsColorMap.isEmpty()) - { - if ( mySymbolsColorMap.contains( mySymbolsColorIds.at(i) ) ) - p->setBrush( QBrush( mySymbolsColorMap[ mySymbolsColorIds.at(i) ] ) ); - else - p->setBrush( symbol.brush() ); - } + if ( mySymbolsColorMap.contains( mySymbolsColorIds.at(i) ) ) + p->setBrush( QBrush( mySymbolsColorMap[ mySymbolsColorIds.at(i) ] ) ); + else + p->setBrush( symbol.brush() ); + } + if ( (i == from || i == to) && myNbMarkers >= 0 ) + { rect.moveCenter( QPoint( u1, v1 ) ); symbol.draw( p, rect ); } - - if ( i > from && myNbMarkers > 0 ) + else if ( i > from && myNbMarkers > 0 ) { double u0 = xMap.transform( x( i - 1 ) ); double v0 = yMap.transform( y( i - 1 ) ); @@ -2200,14 +2199,6 @@ void Plot2d_PlotCurve::drawSymbols( QPainter *p, const QwtSymbol &symbol, ( ( dX >= 0 && u <= u1 ) || ( dX <= 0 && u1 <= u ) ) && ( ( dY >= 0 && v <= v1 ) || ( dY <= 0 && v1 <= v ) ) ) { - if ( !mySymbolsColorMap.isEmpty() ) - { - if ( mySymbolsColorMap.contains( mySymbolsColorIds.at(i) ) ) - p->setBrush( QBrush( mySymbolsColorMap[ mySymbolsColorIds.at(i) ] ) ); - else - p->setBrush( symbol.brush() ); - } - rect.moveCenter( QPoint( u, v ) ); symbol.draw( p, rect );