From 2768ce9b051398e504604ca2663fa087bd3eab75 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sat, 26 Sep 2015 17:49:16 +1000 Subject: Use AudioSetupDialog as parent of the error message popup when failing to start engine Without a session loaded this makes the message dialog appear in front of the AudioSetup dialog instead of randomly up in the top left somewhere. This does mean though that if the AudioSetup dialog is not visible the error message popup will appear randomly up in the top left(at least on windows, it seems fine on linux) but I will fix that shortly. --- gtk2_ardour/ardour_ui.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 5b1a24859e..ee356fb2a9 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -4501,13 +4501,8 @@ ARDOUR_UI::reconnect_to_engine () { if (AudioEngine::instance()->start ()) { // TODO somehow make this the topmost window (above any dialogs currently visible) - if (editor) { - MessageDialog msg (*editor, AudioEngine::instance()->get_last_backend_error ()); - msg.run (); - } else { - MessageDialog msg (AudioEngine::instance()->get_last_backend_error ()); - msg.run (); - } + MessageDialog msg(*audio_midi_setup.get(), AudioEngine::instance()->get_last_backend_error()); + msg.run(); return -1; } -- cgit v1.2.3