Mercurial > hg > svgui
comparison view/View.cpp @ 513:1341e95eeae9
* Make drawing segment divisions optional in segmentation plot style of
time value layer
* Don't follow playback when Alt is held down (complements use of Alt as
peek modifier)
author | Chris Cannam |
---|---|
date | Thu, 26 Feb 2009 16:58:25 +0000 |
parents | 455810e65543 |
children | e4e0ae491a48 |
comparison
equal
deleted
inserted
replaced
512:ed65126e503d | 513:1341e95eeae9 |
---|---|
940 (getXForFrame(m_playPointerFrame) != getXForFrame(newFrame)); | 940 (getXForFrame(m_playPointerFrame) != getXForFrame(newFrame)); |
941 size_t oldPlayPointerFrame = m_playPointerFrame; | 941 size_t oldPlayPointerFrame = m_playPointerFrame; |
942 m_playPointerFrame = newFrame; | 942 m_playPointerFrame = newFrame; |
943 if (!visibleChange) return; | 943 if (!visibleChange) return; |
944 | 944 |
945 bool somethingGoingOn = | |
946 ((QApplication::mouseButtons() != Qt::NoButton) || | |
947 (QApplication::keyboardModifiers() & Qt::AltModifier)); | |
948 | |
945 switch (m_followPlay) { | 949 switch (m_followPlay) { |
946 | 950 |
947 case PlaybackScrollContinuous: | 951 case PlaybackScrollContinuous: |
948 if (QApplication::mouseButtons() == Qt::NoButton) { | 952 if (!somethingGoingOn) { |
949 setCentreFrame(m_playPointerFrame, false); | 953 setCentreFrame(m_playPointerFrame, false); |
950 } | 954 } |
951 break; | 955 break; |
952 | 956 |
953 case PlaybackScrollPage: | 957 case PlaybackScrollPage: |
984 #ifdef DEBUG_VIEW_WIDGET_PAINT | 988 #ifdef DEBUG_VIEW_WIDGET_PAINT |
985 std::cerr << "xnew = " << xnew << ", width = " << width() << std::endl; | 989 std::cerr << "xnew = " << xnew << ", width = " << width() << std::endl; |
986 #endif | 990 #endif |
987 | 991 |
988 if (xnew < width()/8 || xnew > (width()*7)/8) { | 992 if (xnew < width()/8 || xnew > (width()*7)/8) { |
989 if (QApplication::mouseButtons() == Qt::NoButton) { | 993 if (!somethingGoingOn) { |
990 long offset = getFrameForX(width()/2) - getStartFrame(); | 994 long offset = getFrameForX(width()/2) - getStartFrame(); |
991 long newCentre = sf + offset; | 995 long newCentre = sf + offset; |
992 bool changed = setCentreFrame(newCentre, false); | 996 bool changed = setCentreFrame(newCentre, false); |
993 if (changed) { | 997 if (changed) { |
994 xold = getXForFrame(oldPlayPointerFrame); | 998 xold = getXForFrame(oldPlayPointerFrame); |