From 4b9baae18fabed6efd58299db0e0bf5f64d49c61 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 18 Feb 2015 19:27:17 -0500 Subject: [PATCH] make undo and redo actions insensitive when appropriate. This obviously affects menu items and other proxies for these actions --- gtk2_ardour/editor.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index e70ab4fc5d..b0dfadaecc 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -3338,8 +3338,10 @@ Editor::history_changed () if (undo_action && _session) { if (_session->undo_depth() == 0) { label = S_("Command|Undo"); + undo_action->set_sensitive (false); } else { label = string_compose(S_("Command|Undo (%1)"), _session->next_undo()); + undo_action->set_sensitive (true); } undo_action->property_label() = label; } @@ -3347,8 +3349,10 @@ Editor::history_changed () if (redo_action && _session) { if (_session->redo_depth() == 0) { label = _("Redo"); + redo_action->set_sensitive (false); } else { label = string_compose(_("Redo (%1)"), _session->next_redo()); + redo_action->set_sensitive (true); } redo_action->property_label() = label; }