# HG changeset patch # User Chris Cannam # Date 1368706273 -3600 # Node ID 77fa3fdbfc7e2b9f96eac6524d48294fb47760c3 # Parent 2c35737cd3f84d3b9a5363d12fa1480ff7b5009a Fix bug that caused overview to jump back to its original position after moving on double-click diff -r 2c35737cd3f8 -r 77fa3fdbfc7e view/Overview.cpp --- a/view/Overview.cpp Wed May 15 22:15:49 2013 +0100 +++ b/view/Overview.cpp Thu May 16 13:11:13 2013 +0100 @@ -22,7 +22,7 @@ #include #include -#define DEBUG_OVERVIEW 1 +//#define DEBUG_OVERVIEW 1 using std::cerr; using std::endl; @@ -277,6 +277,9 @@ if (std::max(m_centreFrame, newCentreFrame) - std::min(m_centreFrame, newCentreFrame) > size_t(m_zoomLevel)) { size_t rf = alignToReference(newCentreFrame); +#ifdef DEBUG_OVERVIEW + std::cerr << "Overview::mouseMoveEvent: x " << e->x() << " and click x " << m_clickPos.x() << " -> frame " << newCentreFrame << " -> rf " << rf << std::endl; +#endif emit centreFrameChanged(rf, true, PlaybackScrollContinuous); } } @@ -287,6 +290,10 @@ long frame = getFrameForX(e->x()); size_t rf = 0; if (frame > 0) rf = alignToReference(frame); +#ifdef DEBUG_OVERVIEW + std::cerr << "Overview::mouseDoubleClickEvent: frame " << frame << " -> rf " << rf << std::endl; +#endif + m_clickedInRange = false; // we're not starting a drag with the second click emit centreFrameChanged(rf, true, PlaybackScrollContinuous); } diff -r 2c35737cd3f8 -r 77fa3fdbfc7e view/ViewManager.cpp --- a/view/ViewManager.cpp Wed May 15 22:15:49 2013 +0100 +++ b/view/ViewManager.cpp Thu May 16 13:11:13 2013 +0100 @@ -26,7 +26,7 @@ #include -#define DEBUG_VIEW_MANAGER 1 +//#define DEBUG_VIEW_MANAGER 1 ViewManager::ViewManager() : m_playSource(0),