summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui2.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-02-27 22:25:37 +0100
committerRobin Gareus <robin@gareus.org>2020-02-27 22:25:37 +0100
commite5c819956a95a1dc9dee8f805dc55757dc51233d (patch)
tree4aff23fcfa478134704cbc3080ea371fef024181 /gtk2_ardour/ardour_ui2.cc
parent0b027f7678379b6548b394a87506f09579c68268 (diff)
Punch/Loop GUI control sensitivity
Diffstat (limited to 'gtk2_ardour/ardour_ui2.cc')
-rw-r--r--gtk2_ardour/ardour_ui2.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc
index 70ff8f7c39..e7306bea00 100644
--- a/gtk2_ardour/ardour_ui2.cc
+++ b/gtk2_ardour/ardour_ui2.cc
@@ -811,6 +811,14 @@ ARDOUR_UI::set_transport_sensitivity (bool yn)
}
void
+ARDOUR_UI::set_punch_sensitivity ()
+{
+ bool can_punch = _session && _session->punch_is_possible() && _session->locations()->auto_punch_location ();
+ ActionManager::get_action ("Transport", "TogglePunchIn")->set_sensitive (can_punch);
+ ActionManager::get_action ("Transport", "TogglePunchOut")->set_sensitive (can_punch);
+}
+
+void
ARDOUR_UI::editor_realized ()
{
boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));