diff view/Pane.cpp @ 1186:8665e0ffa0d8 levelpanwidget

Merge from branch 3.0-integration
author Chris Cannam
date Wed, 14 Dec 2016 14:28:41 +0000
parents 97d0c798c2ac
children 54e6be7ebe11
line wrap: on
line diff
--- a/view/Pane.cpp	Tue Dec 06 09:47:27 2016 +0000
+++ b/view/Pane.cpp	Wed Dec 14 14:28:41 2016 +0000
@@ -1053,23 +1053,19 @@
     sv_samplerate_t modelRate = waveformModel->getSampleRate();
     sv_samplerate_t nativeRate = waveformModel->getNativeRate();
     sv_samplerate_t playbackRate = m_manager->getPlaybackSampleRate();
-    sv_samplerate_t outputRate = m_manager->getOutputSampleRate();
         
     QString srNote = "";
 
-    // Show (R) for waveform models that have been resampled or will
-    // be resampled on playback, and (X) for waveform models that will
-    // be played at the wrong rate because their rate differs from the
-    // current playback rate (which is not necessarily that of the
-    // main model).
-
-    if (playbackRate != 0) {
-        if (modelRate == playbackRate) {
-            if (modelRate != outputRate || modelRate != nativeRate) {
-                srNote = " " + tr("(R)");
-            }
-        } else {
+    // Show (R) for waveform models that have been resampled during
+    // load, and (X) for waveform models that will be played at the
+    // wrong rate because their rate differs from the current playback
+    // rate (which is not necessarily that of the main model).
+
+    if (modelRate != nativeRate) {
+        if (playbackRate != 0 && modelRate != playbackRate) {
             srNote = " " + tr("(X)");
+        } else {            
+            srNote = " " + tr("(R)");
         }
     }
 
@@ -2292,7 +2288,7 @@
     }
 
     if (e->phase() == Qt::ScrollBegin ||
-        fabs(d) >= 120 ||
+        std::abs(d) >= 120 ||
         (d > 0 && m_pendingWheelAngle < 0) ||
         (d < 0 && m_pendingWheelAngle > 0)) {
         m_pendingWheelAngle = d;