changeset 1328:b39cd8fb309f zoom

Avoid compiler warning
author Chris Cannam
date Thu, 20 Sep 2018 13:14:15 +0100
parents 646e713a4632
children 344f29e46258
files view/Overview.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
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;