From 29525db35714fb6f384f43ce9b0e504bf38383e5 Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 7 Apr 2017 12:05:10 +0300 Subject: [PATCH] USUL 0004209: External 622: Regression: tool-tips are not shown for "Chevelure" curves --- src/Plot2d/Plot2d_ToolTip.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Plot2d/Plot2d_ToolTip.cxx b/src/Plot2d/Plot2d_ToolTip.cxx index 1344edfb4..c0e28eac0 100644 --- a/src/Plot2d/Plot2d_ToolTip.cxx +++ b/src/Plot2d/Plot2d_ToolTip.cxx @@ -64,10 +64,19 @@ void Plot2d_ToolTip::onToolTip( QPoint p, QString& str, QFont& f, QRect& txtRect foreach(int j, aPnts) { aTxt = aCurves[i]->text( j ); - if (!aTxt.isEmpty()) - { - str += ("

" + aTxt + "

"); - } + if( !aTxt.isEmpty() ) + str += QString( "

%1

" ).arg( aTxt ); + } + } + + // Produce a tooltip containing titles of all found curves. + if( str.isEmpty() ) + { + for(int i = 0; i < aCurves.length(); i++) + { + aTxt = aCurves[i]->getVerTitle(); + if( !aTxt.isEmpty() ) + str += QString( "

%1

" ).arg( aTxt ); } } -- 2.39.2