fix import-thread SNAFU
[ardour.git] / gtk2_ardour / interthread_progress_window.cc
index e63bf629a9e4d012b27ab41dbe0c28503f948d11..2f64644d5d195d819ca6145192e30f7262a9c897 100644 (file)
@@ -55,6 +55,14 @@ InterthreadProgressWindow::InterthreadProgressWindow (ARDOUR::InterThreadInfo* i
        Glib::signal_timeout().connect (sigc::mem_fun (*this, &InterthreadProgressWindow::update), 100);
 }
 
+void
+InterthreadProgressWindow::on_hide ()
+{
+       if (!_interthread_info->done) {
+               _interthread_info->cancel = true;
+       }
+}
+
 void
 InterthreadProgressWindow::cancel_clicked ()
 {