summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-12-03 03:05:59 +0000
committerCarl Hetherington <carl@carlh.net>2011-12-03 03:05:59 +0000
commitf817155f20740745de3baee93a9818993b4509ba (patch)
tree54307f4f5a97ff3687f958263d0d22bb0a9a046d /gtk2_ardour/editor_ops.cc
parent5931ff08ed514cbd7579428d70de229aa7425f99 (diff)
Fix somewhat unlikely crash on doing add note; start drag to resize note; undo; finish drag to resize note.
git-svn-id: svn://localhost/ardour2/branches/3.0@10880 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 4a9183ddd2..c598af2453 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -104,6 +104,10 @@ using Gtkmm2ext::Keyboard;
void
Editor::undo (uint32_t n)
{
+ if (_drags->active ()) {
+ _drags->abort ();
+ }
+
if (_session) {
_session->undo (n);
}
@@ -112,6 +116,10 @@ Editor::undo (uint32_t n)
void
Editor::redo (uint32_t n)
{
+ if (_drags->active ()) {
+ _drags->abort ();
+ }
+
if (_session) {
_session->redo (n);
}