From b21fe02fa2ae017520d6e4a6e05a5e371286bcaf Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Mon, 7 Apr 2014 13:46:38 -0700 Subject: [PATCH] Put ModelUploder on a different thread, not to block the rendering of the main window --- interface/src/Application.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index d54cceb245..fb50f647e8 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3245,9 +3245,12 @@ void Application::toggleRunningScriptsWidget() void Application::uploadFST(bool isHead) { ModelUploader* uploader = new ModelUploader(isHead); - if (uploader->zip()) { - uploader->send(); - } + QThread* thread = new QThread(); + thread->connect(uploader, SIGNAL(destroyed()), SLOT(quit())); + thread->connect(thread, SIGNAL(finished()), SLOT(deleteLater())); + uploader->connect(thread, SIGNAL(started()), SLOT(send())); + + thread->start(); } void Application::uploadHead() {