summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-05-15 13:40:07 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-05-15 13:40:07 +0000
commite313838485697033d1b7366105968d789ea4228e (patch)
tree38a16e864ad971c4e83c13cf3fe6a10e267cff83 /gtk2_ardour/editor_ops.cc
parent9044bb80f73b0d1170b54e8ac869b5c0af7b497c (diff)
generalize "delete-while-mouse-button-pressed" fix; make LADSPA/VST plugins compute i/o numbers correctly; add spacing to wierd plugin config dialog
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3354 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc25
1 files changed, 20 insertions, 5 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 691dc3d8ef..084859dc83 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -3673,6 +3673,19 @@ Editor::cut_copy (CutCopyOp op)
opname = _("clear");
break;
}
+
+ /* if we're deleting something, and the mouse is still pressed,
+ the thing we started a drag for will be gone when we release
+ the mouse button(s). avoid this. see part 2 at the end of
+ this function.
+ */
+
+ if (op == Cut || op == Clear) {
+ if (drag_info.item) {
+ drag_info.item->ungrab (0);
+ drag_info.item = 0;
+ }
+ }
cut_buffer->clear ();
@@ -3687,11 +3700,8 @@ Editor::cut_copy (CutCopyOp op)
Glib::signal_idle().connect (bind (mem_fun(*this, &Editor::really_remove_marker), loc));
}
- if (drag_info.item) {
- drag_info.item->ungrab (0);
- drag_info.item = 0;
- }
-
+ break_drag ();
+
return;
}
@@ -3756,6 +3766,11 @@ Editor::cut_copy (CutCopyOp op)
default:
break;
}
+
+
+ if (op == Cut || op == Clear) {
+ break_drag ();
+ }
}
void