changeset 375:20bab95852c1

Only update message if it has actually changed (not that this seems to make any difference to anything)
author Chris Cannam
date Tue, 01 Jul 2014 15:33:24 +0100
parents 534bd1def9ee
children 3c724eac1798
files framework/MainWindowBase.cpp
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Thu Jun 19 14:44:47 2014 +0100
+++ b/framework/MainWindowBase.cpp	Tue Jul 01 15:33:24 2014 +0100
@@ -3272,11 +3272,16 @@
 void
 MainWindowBase::contextHelpChanged(const QString &s)
 {
+    QStatusBar *bar = statusBar();
+
     if (s == "" && m_myStatusMessage != "") {
-        statusBar()->showMessage(m_myStatusMessage);
+        if (bar->currentMessage() != m_myStatusMessage) {
+            bar->showMessage(m_myStatusMessage);
+        }
         return;
     }
-    statusBar()->showMessage(s);
+
+    bar->showMessage(s);
 }
 
 void