Mercurial > hg > svgui
diff view/Pane.cpp @ 928:3fb91da7d98d tonioni
Don't snap selections to time ruler -- it's never useful
author | Chris Cannam |
---|---|
date | Tue, 24 Mar 2015 17:05:42 +0000 |
parents | 26da827e8fb5 |
children | 36cddc3de023 e297b7d752f2 |
line wrap: on
line diff
--- a/view/Pane.cpp Tue Mar 24 16:40:55 2015 +0000 +++ b/view/Pane.cpp Tue Mar 24 17:05:42 2015 +0000 @@ -24,6 +24,7 @@ #include "widgets/TextAbbrev.h" #include "base/Preferences.h" #include "layer/WaveformLayer.h" +#include "layer/TimeRulerLayer.h" // GF: added so we can propagate the mouse move event to the note layer for context handling. #include "layer/LayerFactory.h" @@ -1367,7 +1368,8 @@ sv_frame_t snapFrame = mouseFrame; Layer *layer = getInteractionLayer(); - if (layer && !m_shiftPressed) { + if (layer && !m_shiftPressed && + !qobject_cast<TimeRulerLayer *>(layer)) { // don't snap to secs layer->snapToFeatureFrame(this, snapFrame, resolution, Layer::SnapLeft); } @@ -2083,7 +2085,8 @@ sv_frame_t snapFrameRight = mouseFrame; Layer *layer = getInteractionLayer(); - if (layer && !m_shiftPressed) { + if (layer && !m_shiftPressed && + !qobject_cast<TimeRulerLayer *>(layer)) { // don't snap to secs layer->snapToFeatureFrame(this, snapFrameLeft, resolution, Layer::SnapLeft); layer->snapToFeatureFrame(this, snapFrameRight,