Use central method to check for engine where required
These are generally places where tracks/busses are created or port connections change.
This commit is contained in:
parent
415721fa5b
commit
f150f6c074
|
@ -4362,8 +4362,7 @@ ARDOUR_UI::add_route_dialog_response (int r)
|
|||
return;
|
||||
}
|
||||
add_route_dialog->ArdourDialog::on_response (r);
|
||||
MessageDialog msg (_("Not connected to audio engine - Adding Tracks/Busses is not possible"));
|
||||
msg.run ();
|
||||
ARDOUR_UI_UTILS::no_engine_notify ();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -373,6 +373,9 @@ Editor::track_canvas_drag_data_received (const RefPtr<Gdk::DragContext>& context
|
|||
const SelectionData& data,
|
||||
guint info, guint time)
|
||||
{
|
||||
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||
return;
|
||||
}
|
||||
if (data.get_target() == "regions") {
|
||||
drop_regions (context, x, y, data, info, time);
|
||||
} else {
|
||||
|
|
|
@ -1428,8 +1428,7 @@ RegionMoveDrag::finished (GdkEvent* ev, bool movement_occurred)
|
|||
RouteTimeAxisView*
|
||||
RegionMoveDrag::create_destination_time_axis (boost::shared_ptr<Region> region, TimeAxisView* original)
|
||||
{
|
||||
if (!AudioEngine::instance()->running ()) {
|
||||
error << _("Not connected to audio engine - Could not create new track after region placed in the drop zone") << endmsg;
|
||||
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include "widgets/prompter.h"
|
||||
|
||||
#include "ardour/audio_track.h"
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/audioregion.h"
|
||||
#include "ardour/boost_debug.h"
|
||||
#include "ardour/dB.h"
|
||||
|
@ -111,6 +110,7 @@
|
|||
#include "transpose_dialog.h"
|
||||
#include "transform_dialog.h"
|
||||
#include "ui_config.h"
|
||||
#include "utils.h"
|
||||
#include "vca_time_axis.h"
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
|
@ -7421,9 +7421,7 @@ Editor::_remove_tracks ()
|
|||
return;
|
||||
}
|
||||
|
||||
if (!AudioEngine::instance()->running ()) {
|
||||
MessageDialog msg (_("Not connected to audio engine - Removing Tracks/Busses is not possible"));
|
||||
msg.run ();
|
||||
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -873,9 +873,7 @@ gint
|
|||
MixerStrip::output_press (GdkEventButton *ev)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
if (!_session->engine().connected()) {
|
||||
MessageDialog msg (_("Not connected to audio engine - no I/O changes are possible"));
|
||||
msg.run ();
|
||||
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -989,9 +987,7 @@ MixerStrip::input_press (GdkEventButton *ev)
|
|||
input_menu.set_name ("ArdourContextMenu");
|
||||
citems.clear();
|
||||
|
||||
if (!_session->engine().connected()) {
|
||||
MessageDialog msg (_("Not connected to audio engine - no I/O changes are possible"));
|
||||
msg.run ();
|
||||
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -3720,9 +3720,7 @@ ProcessorBox::get_editor_window (boost::shared_ptr<Processor> processor, bool us
|
|||
|
||||
} else if ((port_insert = boost::dynamic_pointer_cast<PortInsert> (processor)) != 0) {
|
||||
|
||||
if (!_session->engine().connected()) {
|
||||
MessageDialog msg ( _("Not connected to audio engine - no I/O changes are possible"));
|
||||
msg.run ();
|
||||
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2323,9 +2323,7 @@ RouteUI::manage_pins ()
|
|||
void
|
||||
RouteUI::fan_out (bool to_busses, bool group)
|
||||
{
|
||||
if (!AudioEngine::instance()->running ()) {
|
||||
MessageDialog msg (_("Not connected to audio engine - Fanning out to Tracks/Busses is not possible"));
|
||||
msg.run ();
|
||||
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2057,7 +2057,7 @@ SoundFileOmega::do_something (int action)
|
|||
{
|
||||
SoundFileBrowser::do_something (action);
|
||||
|
||||
if (action == RESPONSE_CLOSE) {
|
||||
if (action == RESPONSE_CLOSE || ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||
hide ();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue