diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-08-17 19:22:15 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-08-17 19:22:26 -0400 |
commit | e8427ee2cb31e91fce54461056c6a430bb74add1 (patch) | |
tree | 11aa65b1f0da0dc416c0f8f6223dc048d2106404 /gtk2_ardour | |
parent | 41cc35cf6e279c4bf99b1c326a6fdc0c53fce495 (diff) |
GUI does an even stronger check on no undo/redo while recording
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index e5d762332e..f7bbf2a166 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -119,6 +119,13 @@ using Gtkmm2ext::Keyboard; void Editor::undo (uint32_t n) { + if (_session && _session->actively_recording()) { + /* no undo allowed while recording. Session will check also, + but we don't even want to get to that. + */ + return; + } + if (_drags->active ()) { _drags->abort (); } @@ -136,12 +143,19 @@ Editor::undo (uint32_t n) void Editor::redo (uint32_t n) { + if (_session && _session->actively_recording()) { + /* no redo allowed while recording. Session will check also, + but we don't even want to get to that. + */ + return; + } + if (_drags->active ()) { _drags->abort (); } if (_session) { - _session->redo (n); + _session->redo (n); if (_session->redo_depth() == 0) { redo_action->set_sensitive(false); } |