# HG changeset patch # User Chris Cannam # Date 1235645348 0 # Node ID 683c46d7500b4482d5d88bc9bc6ba7e1ef46d9fa # Parent f8b98f63f200ce47293f57e051e2df8512ec52b6 * Handle zero-velocity note ons as well as note offs (can't believe I fell for that one) * Add Peek Left / Peek Right (alt+left/right) and change peek-drag (i.e. dragging without moving playback pointer or other panes) from ctrl+drag to alt+drag for symmetry diff -r f8b98f63f200 -r 683c46d7500b view/Pane.cpp --- a/view/Pane.cpp Wed Feb 25 17:41:34 2009 +0000 +++ b/view/Pane.cpp Thu Feb 26 10:49:08 2009 +0000 @@ -64,6 +64,7 @@ m_clickedInRange(false), m_shiftPressed(false), m_ctrlPressed(false), + m_altPressed(false), m_navigating(false), m_resizing(false), m_editing(false), @@ -1237,6 +1238,7 @@ m_editingSelectionEdge = 0; m_shiftPressed = (e->modifiers() & Qt::ShiftModifier); m_ctrlPressed = (e->modifiers() & Qt::ControlModifier); + m_altPressed = (e->modifiers() & Qt::AltModifier); m_dragMode = UnresolvedDrag; ViewManager::ToolMode mode = ViewManager::NavigateMode; @@ -1739,7 +1741,7 @@ } if (getXForFrame(m_centreFrame) != getXForFrame(newCentreFrame)) { - setCentreFrame(newCentreFrame, !m_ctrlPressed); + setCentreFrame(newCentreFrame, !m_altPressed); } } @@ -1925,6 +1927,7 @@ m_clickedInRange = true; m_shiftPressed = (e->modifiers() & Qt::ShiftModifier); m_ctrlPressed = (e->modifiers() & Qt::ControlModifier); + m_altPressed = (e->modifiers() & Qt::AltModifier); ViewManager::ToolMode mode = ViewManager::NavigateMode; if (m_manager) mode = m_manager->getToolMode(); diff -r f8b98f63f200 -r 683c46d7500b view/Pane.h --- a/view/Pane.h Wed Feb 25 17:41:34 2009 +0000 +++ b/view/Pane.h Thu Feb 26 10:49:08 2009 +0000 @@ -140,6 +140,7 @@ bool m_clickedInRange; bool m_shiftPressed; bool m_ctrlPressed; + bool m_altPressed; bool m_navigating; bool m_resizing; diff -r f8b98f63f200 -r 683c46d7500b view/View.cpp --- a/view/View.cpp Wed Feb 25 17:41:34 2009 +0000 +++ b/view/View.cpp Thu Feb 26 10:49:08 2009 +0000 @@ -1354,7 +1354,7 @@ } void -View::scroll(bool right, bool lots) +View::scroll(bool right, bool lots, bool e) { long delta; if (lots) { @@ -1365,11 +1365,11 @@ if (right) delta = -delta; if (int(m_centreFrame) < delta) { - setCentreFrame(0); + setCentreFrame(0, e); } else if (int(m_centreFrame) - delta >= int(getModelsEndFrame())) { - setCentreFrame(getModelsEndFrame()); + setCentreFrame(getModelsEndFrame(), e); } else { - setCentreFrame(m_centreFrame - delta); + setCentreFrame(m_centreFrame - delta, e); } } diff -r f8b98f63f200 -r 683c46d7500b view/View.h --- a/view/View.h Wed Feb 25 17:41:34 2009 +0000 +++ b/view/View.h Thu Feb 26 10:49:08 2009 +0000 @@ -141,7 +141,7 @@ /** * Scroll left or right by a smallish or largish amount. */ - virtual void scroll(bool right, bool lots); + virtual void scroll(bool right, bool lots, bool doEmit = true); virtual void addLayer(Layer *v); virtual void removeLayer(Layer *v); // does not delete the layer