From 7ade2099ce8ca527c3c711941ffaa3d5e1e34185 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 15 Dec 2021 15:52:15 -0700 Subject: [PATCH] move point of deletion of video timeline The "ask about deletion" dialog will run a recursive main loop which will call idle handlers, which could call the visual change handler if the playhead is rolling. VTL is assumed to stoll exist when this is called --- gtk2_ardour/ardour_ui.cc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index e38009ed88..9aef4fc76a 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1066,10 +1066,6 @@ If you still wish to quit, please use the\n\n\ fps_connection.disconnect(); } - delete ARDOUR_UI::instance()->video_timeline; - ARDOUR_UI::instance()->video_timeline = NULL; - stop_video_server(); - /* Save state before deleting the session, as that causes some windows to be destroyed before their visible state can be saved. @@ -1084,8 +1080,15 @@ If you still wish to quit, please use the\n\n\ if (_session) { - if (delete_unnamed_session) { + + /* This may run a recursive dialog, which will allow + * for the GTK idle handler to do things. Not a problem + * in itself, but something to keep in mind since it + * isn't visually apparent that this will allow a + * recursive main loop to execute. + */ + ask_about_scratch_deletion (); } @@ -1095,6 +1098,10 @@ If you still wish to quit, please use the\n\n\ } + delete ARDOUR_UI::instance()->video_timeline; + ARDOUR_UI::instance()->video_timeline = NULL; + stop_video_server(); + halt_connection.disconnect (); AudioEngine::instance()->stop (); quit ();