diff view/Overview.cpp @ 1328:b39cd8fb309f zoom

Avoid compiler warning
author Chris Cannam
date Thu, 20 Sep 2018 13:14:15 +0100
parents 97c68bffbda6
children 84c4ddb38415
line wrap: on
line diff
--- a/view/Overview.cpp	Thu Sep 20 11:45:26 2018 +0100
+++ b/view/Overview.cpp	Thu Sep 20 13:14:15 2018 +0100
@@ -329,9 +329,11 @@
         if (newCentreFrame > 0) --newCentreFrame;
     }
     
+    sv_frame_t pixel = sv_frame_t(round(m_zoomLevel.pixelsToFrames(1)));
+    
     if (std::max(m_centreFrame, newCentreFrame) -
         std::min(m_centreFrame, newCentreFrame) >
-        m_zoomLevel.pixelsToFrames(1)) {
+        pixel) {
         sv_frame_t rf = alignToReference(newCentreFrame);
 #ifdef DEBUG_OVERVIEW
         cerr << "Overview::mouseMoveEvent: x " << e->x() << " and click x " << m_clickPos.x() << " -> frame " << newCentreFrame << " -> rf " << rf << endl;