diff 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
line wrap: on
line diff
--- a/view/View.cpp	Thu Feb 26 14:05:13 2009 +0000
+++ b/view/View.cpp	Thu Feb 26 16:58:25 2009 +0000
@@ -942,10 +942,14 @@
     m_playPointerFrame = newFrame;
     if (!visibleChange) return;
 
+    bool somethingGoingOn =
+        ((QApplication::mouseButtons() != Qt::NoButton) ||
+         (QApplication::keyboardModifiers() & Qt::AltModifier));
+
     switch (m_followPlay) {
 
     case PlaybackScrollContinuous:
-	if (QApplication::mouseButtons() == Qt::NoButton) {
+	if (!somethingGoingOn) {
 	    setCentreFrame(m_playPointerFrame, false);
 	}
 	break;
@@ -986,7 +990,7 @@
 #endif
 
 	if (xnew < width()/8 || xnew > (width()*7)/8) {
-	    if (QApplication::mouseButtons() == Qt::NoButton) {
+	    if (!somethingGoingOn) {
 		long offset = getFrameForX(width()/2) - getStartFrame();
 		long newCentre = sf + offset;
 		bool changed = setCentreFrame(newCentre, false);