From 33cc2a43260589743884e5f004e54119c013d72f Mon Sep 17 00:00:00 2001 From: mfeemster Date: Mon, 16 May 2016 19:24:45 -0700 Subject: [PATCH] --Bug fixes -Fix final render dialog failure when minimizing and restoring during a render on Linux. Note this bug was not present on Windows. --- Source/Fractorium/FinalRenderDialog.cpp | 5 ++++- Source/Fractorium/FinalRenderEmberController.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Fractorium/FinalRenderDialog.cpp b/Source/Fractorium/FinalRenderDialog.cpp index 0985bfe..ae629e6 100644 --- a/Source/Fractorium/FinalRenderDialog.cpp +++ b/Source/Fractorium/FinalRenderDialog.cpp @@ -636,7 +636,10 @@ void FractoriumFinalRenderDialog::OnCancelRenderClicked(bool checked) /// The event void FractoriumFinalRenderDialog::showEvent(QShowEvent* e) { - if (CreateControllerFromGUI(true)) + if (m_Controller.get() && m_Controller->m_Run) + return; + + if (CreateControllerFromGUI(true))//Create controller if it does not exist, or if it does and the renderer is not running. { int index = int(m_Fractorium->m_Controller->Index()) + 1; #ifdef DO_DOUBLE diff --git a/Source/Fractorium/FinalRenderEmberController.cpp b/Source/Fractorium/FinalRenderEmberController.cpp index a936360..ad932fc 100644 --- a/Source/Fractorium/FinalRenderEmberController.cpp +++ b/Source/Fractorium/FinalRenderEmberController.cpp @@ -38,7 +38,7 @@ void FinalRenderEmberController::CancelRender() m_Renderer->Abort(); while (m_Renderer->InRender()) - QApplication::processEvents(); + std::this_thread::sleep_for(std::chrono::milliseconds(10)); m_Renderer->EnterRender(); m_Renderer->EnterFinalAccum();