Mercurial > hg > svgui
comparison view/Pane.cpp @ 510:683c46d7500b
* 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
author | Chris Cannam |
---|---|
date | Thu, 26 Feb 2009 10:49:08 +0000 |
parents | 1d605a89fd9b |
children | 3b345b9a4575 |
comparison
equal
deleted
inserted
replaced
509:f8b98f63f200 | 510:683c46d7500b |
---|---|
62 View(w, true), | 62 View(w, true), |
63 m_identifyFeatures(false), | 63 m_identifyFeatures(false), |
64 m_clickedInRange(false), | 64 m_clickedInRange(false), |
65 m_shiftPressed(false), | 65 m_shiftPressed(false), |
66 m_ctrlPressed(false), | 66 m_ctrlPressed(false), |
67 m_altPressed(false), | |
67 m_navigating(false), | 68 m_navigating(false), |
68 m_resizing(false), | 69 m_resizing(false), |
69 m_editing(false), | 70 m_editing(false), |
70 m_releasing(false), | 71 m_releasing(false), |
71 m_centreLineVisible(true), | 72 m_centreLineVisible(true), |
1235 m_clickedInRange = true; | 1236 m_clickedInRange = true; |
1236 m_editingSelection = Selection(); | 1237 m_editingSelection = Selection(); |
1237 m_editingSelectionEdge = 0; | 1238 m_editingSelectionEdge = 0; |
1238 m_shiftPressed = (e->modifiers() & Qt::ShiftModifier); | 1239 m_shiftPressed = (e->modifiers() & Qt::ShiftModifier); |
1239 m_ctrlPressed = (e->modifiers() & Qt::ControlModifier); | 1240 m_ctrlPressed = (e->modifiers() & Qt::ControlModifier); |
1241 m_altPressed = (e->modifiers() & Qt::AltModifier); | |
1240 m_dragMode = UnresolvedDrag; | 1242 m_dragMode = UnresolvedDrag; |
1241 | 1243 |
1242 ViewManager::ToolMode mode = ViewManager::NavigateMode; | 1244 ViewManager::ToolMode mode = ViewManager::NavigateMode; |
1243 if (m_manager) mode = m_manager->getToolMode(); | 1245 if (m_manager) mode = m_manager->getToolMode(); |
1244 | 1246 |
1737 newCentreFrame = getModelsEndFrame(); | 1739 newCentreFrame = getModelsEndFrame(); |
1738 if (newCentreFrame > 0) --newCentreFrame; | 1740 if (newCentreFrame > 0) --newCentreFrame; |
1739 } | 1741 } |
1740 | 1742 |
1741 if (getXForFrame(m_centreFrame) != getXForFrame(newCentreFrame)) { | 1743 if (getXForFrame(m_centreFrame) != getXForFrame(newCentreFrame)) { |
1742 setCentreFrame(newCentreFrame, !m_ctrlPressed); | 1744 setCentreFrame(newCentreFrame, !m_altPressed); |
1743 } | 1745 } |
1744 } | 1746 } |
1745 | 1747 |
1746 if (m_dragMode == VerticalDrag || | 1748 if (m_dragMode == VerticalDrag || |
1747 m_dragMode == FreeDrag) { | 1749 m_dragMode == FreeDrag) { |
1923 | 1925 |
1924 m_clickPos = e->pos(); | 1926 m_clickPos = e->pos(); |
1925 m_clickedInRange = true; | 1927 m_clickedInRange = true; |
1926 m_shiftPressed = (e->modifiers() & Qt::ShiftModifier); | 1928 m_shiftPressed = (e->modifiers() & Qt::ShiftModifier); |
1927 m_ctrlPressed = (e->modifiers() & Qt::ControlModifier); | 1929 m_ctrlPressed = (e->modifiers() & Qt::ControlModifier); |
1930 m_altPressed = (e->modifiers() & Qt::AltModifier); | |
1928 | 1931 |
1929 ViewManager::ToolMode mode = ViewManager::NavigateMode; | 1932 ViewManager::ToolMode mode = ViewManager::NavigateMode; |
1930 if (m_manager) mode = m_manager->getToolMode(); | 1933 if (m_manager) mode = m_manager->getToolMode(); |
1931 | 1934 |
1932 bool relocate = (mode == ViewManager::NavigateMode || | 1935 bool relocate = (mode == ViewManager::NavigateMode || |