From a9907b7d56eb7e47bc7d3d5fb1f4171fde4f2cd8 Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Sat, 29 Sep 2018 14:18:10 +1000 Subject: ipw: Fix race condition with polling the cancel state of the dialog Sometimes the interthread process window dialog reports "cancelled" when it was not actually cancelled, it was just hidden and reshown, Since we are polling the cancel state interthread, we must reset the cancel status BEFORE the dialog is shown, and never toggle the cancel state unless it is a true cancel action by the user. --- gtk2_ardour/interthread_progress_window.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/interthread_progress_window.cc b/gtk2_ardour/interthread_progress_window.cc index c74f12914f..eb32d3e8fa 100644 --- a/gtk2_ardour/interthread_progress_window.cc +++ b/gtk2_ardour/interthread_progress_window.cc @@ -35,6 +35,8 @@ InterthreadProgressWindow::InterthreadProgressWindow (ARDOUR::InterThreadInfo* i : ArdourDialog (t, true) , _interthread_info (i) { + _interthread_info->cancel = false; + _bar.set_orientation (Gtk::PROGRESS_LEFT_TO_RIGHT); set_border_width (12); @@ -50,8 +52,6 @@ InterthreadProgressWindow::InterthreadProgressWindow (ARDOUR::InterThreadInfo* i set_default_size (200, 100); show_all (); - hide (); - _interthread_info->cancel = false; // override on_hide Glib::signal_timeout().connect (sigc::mem_fun (*this, &InterthreadProgressWindow::update), 100); } -- cgit v1.2.3