comparison 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
comparison
equal deleted inserted replaced
1327:646e713a4632 1328:b39cd8fb309f
327 if (newCentreFrame >= getModelsEndFrame()) { 327 if (newCentreFrame >= getModelsEndFrame()) {
328 newCentreFrame = getModelsEndFrame(); 328 newCentreFrame = getModelsEndFrame();
329 if (newCentreFrame > 0) --newCentreFrame; 329 if (newCentreFrame > 0) --newCentreFrame;
330 } 330 }
331 331
332 sv_frame_t pixel = sv_frame_t(round(m_zoomLevel.pixelsToFrames(1)));
333
332 if (std::max(m_centreFrame, newCentreFrame) - 334 if (std::max(m_centreFrame, newCentreFrame) -
333 std::min(m_centreFrame, newCentreFrame) > 335 std::min(m_centreFrame, newCentreFrame) >
334 m_zoomLevel.pixelsToFrames(1)) { 336 pixel) {
335 sv_frame_t rf = alignToReference(newCentreFrame); 337 sv_frame_t rf = alignToReference(newCentreFrame);
336 #ifdef DEBUG_OVERVIEW 338 #ifdef DEBUG_OVERVIEW
337 cerr << "Overview::mouseMoveEvent: x " << e->x() << " and click x " << m_clickPos.x() << " -> frame " << newCentreFrame << " -> rf " << rf << endl; 339 cerr << "Overview::mouseMoveEvent: x " << e->x() << " and click x " << m_clickPos.x() << " -> frame " << newCentreFrame << " -> rf " << rf << endl;
338 #endif 340 #endif
339 if (m_followPlay == PlaybackScrollContinuous || 341 if (m_followPlay == PlaybackScrollContinuous ||