diff --git a/Data/Bench/EmberBench.ps1 b/Data/Bench/EmberBench.ps1
index ba9f3f9..34f042a 100644
--- a/Data/Bench/EmberBench.ps1
+++ b/Data/Bench/EmberBench.ps1
@@ -9,7 +9,7 @@ else
}
$benchprefix = "./bench/"
-$devices = "2"#Set this to whatever device index your main GPU resides at. If you are unsure, just run emberrender --opencl info to find out.
+$devices = "2"#Set this to whatever device index your main GPU resides at. If you are unsure, just run emberrender --openclinfo to find out.
$cpuquality = 150
$gpuquality = 2000
$verbose = "--verbose"
diff --git a/Source/Fractorium/Fractorium.cpp b/Source/Fractorium/Fractorium.cpp
index 7dbddca..a1995fb 100644
--- a/Source/Fractorium/Fractorium.cpp
+++ b/Source/Fractorium/Fractorium.cpp
@@ -65,7 +65,6 @@ Fractorium::Fractorium(QWidget* p)
m_ColorDialog = new QColorDialog(this);
m_Settings = FractoriumSettings::Instance();
m_QssDialog = new QssDialog(this);
- m_FinalRenderDialog = new FractoriumFinalRenderDialog(this);
m_OptionsDialog = new FractoriumOptionsDialog(this);
m_VarDialog = new FractoriumVariationsDialog(this);
m_AboutDialog = new FractoriumAboutDialog(this);
@@ -789,6 +788,30 @@ QString Fractorium::SetupSaveFolderDialog()
return filename;
}
+///
+/// Setup the final render dialog.
+/// Note this deletes the existing instance before creating the new one.
+/// This must be called every time the final render dialog is shown because
+/// there are problems with reusing it.
+///
+/// True if created successfully, else false
+bool Fractorium::SetupFinalRenderDialog()
+{
+ if (m_FinalRenderDialog)
+ {
+ delete m_FinalRenderDialog;
+ m_FinalRenderDialog = nullptr;
+ }
+
+ if (m_FinalRenderDialog = new FractoriumFinalRenderDialog(this))
+ {
+ connect(m_FinalRenderDialog, SIGNAL(finished(int)), this, SLOT(OnFinalRenderClose(int)), Qt::QueuedConnection);
+ return true;
+ }
+
+ return false;
+}
+
///
/// Thin wrapper around QMessageBox::critical() to allow it to be invoked from another thread.
///
diff --git a/Source/Fractorium/Fractorium.h b/Source/Fractorium/Fractorium.h
index 28fc71b..2e5a919 100644
--- a/Source/Fractorium/Fractorium.h
+++ b/Source/Fractorium/Fractorium.h
@@ -458,6 +458,7 @@ private:
QString SetupSaveXmlDialog(const QString& defaultFilename);
QString SetupSaveImageDialog(const QString& defaultFilename);
QString SetupSaveFolderDialog();
+ bool SetupFinalRenderDialog();
QColorDialog* m_ColorDialog = nullptr;
FractoriumFinalRenderDialog* m_FinalRenderDialog = nullptr;
FractoriumOptionsDialog* m_OptionsDialog = nullptr;
diff --git a/Source/Fractorium/FractoriumLibrary.cpp b/Source/Fractorium/FractoriumLibrary.cpp
index 6d2d81b..c6c445c 100644
--- a/Source/Fractorium/FractoriumLibrary.cpp
+++ b/Source/Fractorium/FractoriumLibrary.cpp
@@ -755,7 +755,10 @@ void Fractorium::OnSequenceRenderButtonClicked(bool checked)
m_Controller->StopAllPreviewRenderers();
m_Controller->SaveCurrentToOpenedFile(false);//Save whatever was edited back to the current open file.
m_RenderStatusLabel->setText("Renderer stopped.");
- m_FinalRenderDialog->Show(true);//Show with a bool specifying that it came from the sequence generator.
+ SetupFinalRenderDialog();
+
+ if (m_FinalRenderDialog)
+ m_FinalRenderDialog->Show(true);//Show with a bool specifying that it came from the sequence generator.
}
}
diff --git a/Source/Fractorium/FractoriumMenus.cpp b/Source/Fractorium/FractoriumMenus.cpp
index 0107445..836cdc6 100644
--- a/Source/Fractorium/FractoriumMenus.cpp
+++ b/Source/Fractorium/FractoriumMenus.cpp
@@ -41,7 +41,6 @@ void Fractorium::InitMenusUI()
connect(ui.ActionStopRenderingPreviews, SIGNAL(triggered(bool)), this, SLOT(OnActionStopRenderingPreviews(bool)), Qt::QueuedConnection);
connect(ui.ActionRenderPreviews, SIGNAL(triggered(bool)), this, SLOT(OnActionRenderPreviews(bool)), Qt::QueuedConnection);
connect(ui.ActionFinalRender, SIGNAL(triggered(bool)), this, SLOT(OnActionFinalRender(bool)), Qt::QueuedConnection);
- connect(m_FinalRenderDialog, SIGNAL(finished(int)), this, SLOT(OnFinalRenderClose(int)), Qt::QueuedConnection);
connect(ui.ActionOptions, SIGNAL(triggered(bool)), this, SLOT(OnActionOptions(bool)), Qt::QueuedConnection);
//Help menu.
connect(ui.ActionAbout, SIGNAL(triggered(bool)), this, SLOT(OnActionAbout(bool)), Qt::QueuedConnection);
@@ -936,7 +935,10 @@ void Fractorium::OnActionFinalRender(bool checked)
m_Controller->StopAllPreviewRenderers();
m_Controller->SaveCurrentToOpenedFile(false);//Save whatever was edited back to the current open file.
m_RenderStatusLabel->setText("Renderer stopped.");
- m_FinalRenderDialog->Show(false);
+ SetupFinalRenderDialog();
+
+ if (m_FinalRenderDialog)
+ m_FinalRenderDialog->Show(false);
}
///
@@ -949,6 +951,8 @@ void Fractorium::OnFinalRenderClose(int result)
StartRenderTimer(false);//Re-create the renderer and start rendering again.
ui.ActionStartStopRenderer->setChecked(false);//Re-enable any controls that might have been disabled.
OnActionStartStopRenderer(false);
+ delete m_FinalRenderDialog;
+ m_FinalRenderDialog = nullptr;
}
///
diff --git a/Source/Fractorium/FractoriumRender.cpp b/Source/Fractorium/FractoriumRender.cpp
index c090e89..75d097e 100644
--- a/Source/Fractorium/FractoriumRender.cpp
+++ b/Source/Fractorium/FractoriumRender.cpp
@@ -701,7 +701,10 @@ bool Fractorium::CreateRendererFromOptions(bool updatePreviews)
ui.ActionCopyKernel->setEnabled(false);
m_OptionsDialog->ui.OpenCLCheckBox->setChecked(false);
m_OptionsDialog->ui.SharedTextureCheckBox->setChecked(false);
- m_FinalRenderDialog->ui.FinalRenderOpenCLCheckBox->setChecked(false);
+
+ if (m_FinalRenderDialog)
+ m_FinalRenderDialog->ui.FinalRenderOpenCLCheckBox->setChecked(false);
+
ok = false;
}