summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2014-12-23 04:52:29 +1100
committerPaul Davis <paul@linuxaudiosystems.com>2015-01-02 08:01:12 -0500
commit61315c314d714dc1fa04c142b5032473e4844896 (patch)
tree985467239de9033a6370480956f37268aca3e1b7 /gtk2_ardour/editor_ops.cc
parent792f9ff37b759bcb68ab6454ed2bbd19f3db3205 (diff)
Make editor undo/redo actions sensitive at appropriate times.
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index a99da327db..7c8d3efb73 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -122,6 +122,9 @@ Editor::undo (uint32_t n)
if (_session) {
_session->undo (n);
+ if (_session->undo_depth() == 0) {
+ undo_action->set_sensitive(false);
+ }
redo_action->set_sensitive(true);
begin_selection_op_history ();
}
@@ -136,10 +139,10 @@ Editor::redo (uint32_t n)
if (_session) {
_session->redo (n);
- cerr << "redo depth is : " << _session->redo_depth() << endl;
if (_session->redo_depth() == 0) {
redo_action->set_sensitive(false);
}
+ undo_action->set_sensitive(true);
begin_selection_op_history ();
}
}