summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-09-22 15:21:06 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-09-22 15:21:06 +0000
commitded4a143db069785aa33eeb6dc9da02770e3ae8e (patch)
treed1a2b94e11a4fe4a1d173e7972414cc16ecee7fd /gtk2_ardour/editor_drag.cc
parentd4aaa9c10cd21ef7e1b0f5509963b57c2465302b (diff)
much craziness with canvas cursors; fix 0 beat cursor text when shortening notes; fix crash when trimming locked regions; don't show trim cursors when region is locked; partial version of enumwriter validation fix from 2.X (less necessary with 3.0; probably more ...
git-svn-id: svn://localhost/ardour2/branches/3.0@7831 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r--gtk2_ardour/editor_drag.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index c4040c346d..33ff839ec5 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -94,7 +94,6 @@ DragManager::add (Drag* d)
void
DragManager::set (Drag* d, GdkEvent* e, Gdk::Cursor* c)
{
- assert (_drags.empty ());
d->set_manager (this);
_drags.push_back (d);
start_grab (e, c);
@@ -1403,8 +1402,15 @@ NoteResizeDrag::start_grab (GdkEvent* event, Gdk::Cursor* /*ignored*/)
{
Gdk::Cursor* cursor;
ArdourCanvas::CanvasNote* cnote = dynamic_cast<ArdourCanvas::CanvasNote*>(_item);
+ float x_fraction = cnote->mouse_x_fraction ();
- Drag::start_grab (event);
+ if (x_fraction > 0.0 && x_fraction < 0.25) {
+ cursor = _editor->left_side_trim_cursor;
+ } else {
+ cursor = _editor->right_side_trim_cursor;
+ }
+
+ Drag::start_grab (event, cursor);
region = &cnote->region_view();