# HG changeset patch # User Chris Cannam # Date 1202749739 0 # Node ID eedb7f341ec5c27425e1d441e2b13ca8da287e1d # Parent 06360ed99cd1c4d16a0b06d4d6166fe51a875d17 * a hack to try to prevent playback pointer bouncing back when playback starts diff -r 06360ed99cd1 -r eedb7f341ec5 view/ViewManager.cpp --- a/view/ViewManager.cpp Mon Feb 11 12:46:39 2008 +0000 +++ b/view/ViewManager.cpp Mon Feb 11 17:08:59 2008 +0000 @@ -275,18 +275,19 @@ MultiSelection::SelectionList sl = getSelections(); if (sl.empty()) return frame; - size_t selectionStartFrame = sl.begin()->getStartFrame(); - if (frame < selectionStartFrame) { - frame = selectionStartFrame; - return frame; + for (MultiSelection::SelectionList::const_iterator i = sl.begin(); + i != sl.end(); ++i) { + + if (frame < i->getEndFrame()) { + if (frame < i->getStartFrame()) { + return i->getStartFrame(); + } else { + return frame; + } + } } - MultiSelection::SelectionList::iterator i = sl.end(); - --i; - size_t selectionEndFrame = i->getEndFrame(); - if (frame > selectionEndFrame) frame = selectionEndFrame; - - return frame; + return sl.begin()->getStartFrame(); } void