Prefer testing the session instead of using a global variable
[ardour.git] / gtk2_ardour / route_ui.cc
index 157bb40a308b7646bc5b5a0b8fdf47dc1a93600b..68c9a0909e103a538efa4e64cb89d65505b2e97c 100644 (file)
@@ -773,9 +773,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
        if (BindingProxy::is_bind_action(ev) )
                return false;
 
-       if (!_session->engine().connected()) {
-               MessageDialog msg (_("Not connected to AudioEngine - cannot engage record"));
-               msg.run ();
+       if (!ARDOUR_UI_UTILS::engine_is_running ()) {
                return false;
        }
 
@@ -2323,7 +2321,7 @@ RouteUI::manage_pins ()
 void
 RouteUI::fan_out (bool to_busses, bool group)
 {
-       if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+       if (!ARDOUR_UI_UTILS::engine_is_running ()) {
                return;
        }