]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
USUL 0004209: External 622: Regression: tool-tips are not shown for "Chevelure" curves
authorouv <oleg.uvarov@opencascade.com>
Fri, 7 Apr 2017 09:05:10 +0000 (12:05 +0300)
committerouv <oleg.uvarov@opencascade.com>
Fri, 7 Apr 2017 09:05:10 +0000 (12:05 +0300)
src/Plot2d/Plot2d_ToolTip.cxx

index 1344edfb417c8c67f482d6e7f7bc6b589daad56a..c0e28eac0beb29fd5b3c2dd9980fc4fd11d24182 100644 (file)
@@ -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 += ("<p>" + aTxt + "</p>");
-      }
+      if( !aTxt.isEmpty() )
+        str += QString( "<p>%1</p>" ).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( "<p>%1</p>" ).arg( aTxt );
     }
   }