Mercurial > hg > svgui
diff view/Pane.cpp @ 283:86a112b5b319
* Make it possible to "measure" a feature on the spectrogram by double-
clicking in measure mode
* Make shift-click-drag (for zoom to region) work in measure mode as well
as navigate mode. It would be nice to be able to shift-doubleclick to
zoom on a feature directly using a combination of these last two features,
but that isn't possible yet.
* Make Del delete the measurement under the mouse pointer.
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2007 15:36:37 +0000 |
parents | 4edaff85875d |
children | cd2492c5fe45 |
line wrap: on
line diff
--- a/view/Pane.cpp Thu Jul 05 11:07:01 2007 +0000 +++ b/view/Pane.cpp Thu Jul 05 15:36:37 2007 +0000 @@ -446,7 +446,7 @@ } if (m_shiftPressed && m_clickedInRange && - toolMode == ViewManager::NavigateMode) { + (toolMode == ViewManager::NavigateMode || m_navigating)) { //!!! be nice if this looked a bit more in keeping with the //selection block @@ -1045,6 +1045,8 @@ tr("Click left button and drag to select region; drag region edge to resize")); kr.registerShortcut(tr("Multi Select"), tr("Ctrl+Left"), tr("Ctrl-click left button and drag to select an additional region")); + kr.registerShortcut(tr("Fine Select"), tr("Shift+Left"), + tr("Shift-click left button and drag to select without snapping to items or grid")); kr.setCategory(tr("Edit Tool Mouse Actions")); kr.registerShortcut(tr("Move"), tr("Left"), @@ -1061,6 +1063,8 @@ tr("Click left button and drag to measure a rectangular area")); kr.registerShortcut(tr("Measure Item"), tr("Double-Click Left"), tr("Click left button and drag to measure extents of an item or shape")); + kr.registerShortcut(tr("Zoom to Area"), tr("Shift+Left"), + tr("Shift-click left button and drag to zoom to a rectangular area")); } void @@ -1086,7 +1090,10 @@ m_navigating = false; - if (mode == ViewManager::NavigateMode || (e->buttons() & Qt::MidButton)) { + if (mode == ViewManager::NavigateMode || + (e->buttons() & Qt::MidButton) || + (mode == ViewManager::MeasureMode && + (e->buttons() & Qt::LeftButton) && m_shiftPressed)) { if (mode != ViewManager::NavigateMode) { setCursor(Qt::PointingHandCursor);