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.
This commit is contained in:
parent
2768ce9b05
commit
463bd470e8
@ -4828,13 +4828,21 @@ ARDOUR_UI::do_audio_midi_setup (uint32_t desired_sample_rate)
|
|||||||
audio_midi_setup->set_desired_sample_rate (desired_sample_rate);
|
audio_midi_setup->set_desired_sample_rate (desired_sample_rate);
|
||||||
audio_midi_setup->set_position (WIN_POS_CENTER);
|
audio_midi_setup->set_position (WIN_POS_CENTER);
|
||||||
|
|
||||||
switch (audio_midi_setup->run()) {
|
int response;
|
||||||
case Gtk::RESPONSE_OK:
|
|
||||||
return 0;
|
while (true) {
|
||||||
case Gtk::RESPONSE_APPLY:
|
response = audio_midi_setup->run();
|
||||||
return 0;
|
switch (response) {
|
||||||
default:
|
case Gtk::RESPONSE_OK:
|
||||||
return -1;
|
if (!AudioEngine::instance()->running()) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,10 +415,12 @@ EngineControl::on_response (int response_id)
|
|||||||
|
|
||||||
switch (response_id) {
|
switch (response_id) {
|
||||||
case RESPONSE_OK:
|
case RESPONSE_OK:
|
||||||
|
if (push_state_to_backend (true) != 0) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
hide ();
|
||||||
|
}
|
||||||
#ifdef PLATFORM_WINDOWS
|
#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
|
// But if there's no session open, this can produce
|
||||||
// a long gap when nothing appears to be happening.
|
// 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
|
#endif
|
||||||
|
break;
|
||||||
case RESPONSE_DELETE_EVENT:
|
case RESPONSE_DELETE_EVENT:
|
||||||
{
|
{
|
||||||
GdkEventButton ev;
|
GdkEventButton ev;
|
||||||
|
Loading…
Reference in New Issue
Block a user