summaryrefslogtreecommitdiff
path: root/gtk2_ardour/engine_dialog.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2015-09-26 20:22:46 +1000
committerTim Mayberry <mojofunk@gmail.com>2015-10-01 09:10:19 +1000
commit463bd470e86a37c747a44f2896c48c75b80e81ca (patch)
tree963a3fe28b8d0d36c9ec32b019c6b67d4f904245 /gtk2_ardour/engine_dialog.cc
parent2768ce9b051398e504604ca2663fa087bd3eab75 (diff)
Don't hide Audio Setup dialog when clicking 'OK' if engine fails to start
This has to be handled in two places, in ARDOUR_UI::do_audio_midi_setup and in the dialogs response handler and in as the window can also be triggered via the window action manager.
Diffstat (limited to 'gtk2_ardour/engine_dialog.cc')
-rw-r--r--gtk2_ardour/engine_dialog.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc
index 663702104b..8799d6aa8f 100644
--- a/gtk2_ardour/engine_dialog.cc
+++ b/gtk2_ardour/engine_dialog.cc
@@ -415,10 +415,12 @@ EngineControl::on_response (int response_id)
switch (response_id) {
case RESPONSE_OK:
+ if (push_state_to_backend (true) != 0) {
+ return;
+ } else {
+ hide ();
+ }
#ifdef PLATFORM_WINDOWS
- // For some reason we don't understand, 'hide()'
- // needs to get called first in Windows
- hide ();
// But if there's no session open, this can produce
// a long gap when nothing appears to be happening.
@@ -430,13 +432,8 @@ EngineControl::on_response (int response_id)
}
}
}
- push_state_to_backend (true);
- break;
-#else
- push_state_to_backend (true);
- hide ();
- break;
#endif
+ break;
case RESPONSE_DELETE_EVENT:
{
GdkEventButton ev;