diff view/Pane.cpp @ 387:f329416bf1a5

* Permit holding Shift while dragging an instant or other edited thing, to override the initial drag resistance (for #1928943 sticky time instants) * better handling of updates during progressive decode load * ready() signal from model (used by vect)
author Chris Cannam
date Mon, 19 May 2008 17:23:11 +0000
parents c0818f064e66
children 46a6daf1119b
line wrap: on
line diff
--- a/view/Pane.cpp	Fri May 16 13:27:07 2008 +0000
+++ b/view/Pane.cpp	Mon May 19 17:23:11 2008 +0000
@@ -1557,14 +1557,25 @@
 
         if (!m_editing) {
 
+            bool resist = true;
+
+            if ((e->modifiers() & Qt::ShiftModifier)) {
+                m_shiftPressed = true;
+                // ... but don't set it false if shift has been
+                // released -- we want the state when we started
+                // dragging to be used most of the time
+            }
+
+            if (m_shiftPressed) resist = false;
+
             DragMode newDragMode = updateDragMode
                 (m_dragMode,
                  m_clickPos,
                  e->pos(),
-                 true,  // can move horiz
-                 true,  // can move vert
-                 true,  // resist horiz
-                 true); // resist vert
+                 true,    // can move horiz
+                 true,    // can move vert
+                 resist,  // resist horiz
+                 resist); // resist vert
 
             if (newDragMode != UnresolvedDrag) {