mark loop button insensitive when there's no loop-range
[ardour.git] / gtk2_ardour / ardour_ui2.cc
index a5b1a93e93a9b121c5b82c641b68bf63b1a1d94a..c264c2c1c6fa2fa25fe1b6c4ab82abfd082046bd 100644 (file)
@@ -848,7 +848,15 @@ ARDOUR_UI::error_blink (bool onoff)
        }
 }
 
-
+void
+ARDOUR_UI::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());
+       }
+}
 
 void
 ARDOUR_UI::set_transport_sensitivity (bool yn)