changeset 1377:d18ca558049e

Use label of property for tooltip, not just id of it
author Chris Cannam
date Tue, 06 Nov 2018 13:34:56 +0000
parents 5a051ca3170e
children f08a3b8cdb9d
files widgets/PropertyBox.cpp
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/widgets/PropertyBox.cpp	Tue Nov 06 11:13:13 2018 +0000
+++ b/widgets/PropertyBox.cpp	Tue Nov 06 13:34:56 2018 +0000
@@ -834,6 +834,11 @@
         }
     }
 
+    QString propertyLabel;
+    if (wname != "") {
+        propertyLabel = m_container->getPropertyLabel(wname);
+    }
+    
     if (w == m_showButton) {
         emit contextHelpChanged(tr("Toggle Visibility of %1").arg(cname));
     } else if (w == m_playButton) {
@@ -842,10 +847,10 @@
         return;
     } else if (qobject_cast<QAbstractButton *>(w)) {
         emit contextHelpChanged(tr("Toggle %1 property of %2")
-                                .arg(wname).arg(cname));
+                                .arg(propertyLabel).arg(cname));
     } else {
         emit contextHelpChanged(tr("Adjust %1 property of %2%3")
-                                .arg(wname).arg(cname).arg(extraText));
+                                .arg(propertyLabel).arg(cname).arg(extraText));
     }
 }