summaryrefslogtreecommitdiff
path: root/gtk2_ardour/interthread_progress_window.cc
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2018-09-29 14:18:10 +1000
committerDamien Zammit <damien@zamaudio.com>2018-10-02 20:14:04 +1000
commita9907b7d56eb7e47bc7d3d5fb1f4171fde4f2cd8 (patch)
tree73669665174f726d3b0382be899ec53875553c7a /gtk2_ardour/interthread_progress_window.cc
parentfeb2763a8ada85aba4d68117e7418e29272a242b (diff)
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.
Diffstat (limited to 'gtk2_ardour/interthread_progress_window.cc')
-rw-r--r--gtk2_ardour/interthread_progress_window.cc4
1 files 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);
}