summaryrefslogtreecommitdiff
path: root/gtk2_ardour/transport_control_ui.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/transport_control_ui.cc
parent0b027f7678379b6548b394a87506f09579c68268 (diff)
Punch/Loop GUI control sensitivity
Diffstat (limited to 'gtk2_ardour/transport_control_ui.cc')
-rw-r--r--gtk2_ardour/transport_control_ui.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk2_ardour/transport_control_ui.cc b/gtk2_ardour/transport_control_ui.cc
index 05c91f3f6b..c3b6fb552a 100644
--- a/gtk2_ardour/transport_control_ui.cc
+++ b/gtk2_ardour/transport_control_ui.cc
@@ -179,6 +179,7 @@ TransportControlUI::set_session (ARDOUR::Session *s)
_session->StepEditStatusChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&TransportControlUI::step_edit_status_change, this, _1), gui_context());
_session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&TransportControlUI::map_transport_state, this), gui_context());
_session->auto_loop_location_changed.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&TransportControlUI::set_loop_sensitivity, this), gui_context ());
+ _session->PunchLoopConstraintChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&TransportControlUI::set_loop_sensitivity, this), gui_context ());
rec_button.set_sensitive (true);
}
@@ -287,7 +288,7 @@ TransportControlUI::set_loop_sensitivity ()
if (!_session || _session->config.get_external_sync()) {
auto_loop_button.set_sensitive (false);
} else {
- auto_loop_button.set_sensitive (_session && _session->locations()->auto_loop_location());
+ auto_loop_button.set_sensitive (_session && _session->loop_is_possible() && _session->locations()->auto_loop_location());
}
}