Consolidate two more engine-checks
This commit is contained in:
parent
245d48dbd0
commit
0805b6b925
|
@ -48,6 +48,7 @@
|
||||||
#include "gui_thread.h"
|
#include "gui_thread.h"
|
||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
#include "ui_config.h"
|
#include "ui_config.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
#include "pbd/i18n.h"
|
#include "pbd/i18n.h"
|
||||||
|
|
||||||
|
@ -1794,8 +1795,11 @@ PluginPinWidget::sc_input_press (GdkEventButton *ev, boost::weak_ptr<ARDOUR::Por
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
assert (_session);
|
assert (_session);
|
||||||
if (_session->actively_recording () || !_session->engine ().connected ()) {
|
if (!ARDOUR_UI_UTILS::engine_is_running ()) {
|
||||||
error_message_dialog (_("Port Connections are only available with active Audio/MIDI system."));
|
return false;
|
||||||
|
}
|
||||||
|
if (_session->actively_recording ()) {
|
||||||
|
error_message_dialog (/* unused */ "");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -773,9 +773,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
|
||||||
if (BindingProxy::is_bind_action(ev) )
|
if (BindingProxy::is_bind_action(ev) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!_session->engine().connected()) {
|
if (!ARDOUR_UI_UTILS::engine_is_running ()) {
|
||||||
MessageDialog msg (_("Not connected to AudioEngine - cannot engage record"));
|
|
||||||
msg.run ();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user