--Bug fixes

-Returning to main window after closing the final render dialog wouldn't restart the renderer.

--Code changes
 -Recreate the final render dialog each time it's shown.
This commit is contained in:
Person
2019-12-30 21:12:10 -08:00
parent 7ced17a6b2
commit 96d72004fc
6 changed files with 40 additions and 6 deletions

View File

@ -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;
}
/// <summary>
/// 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.
/// </summary>
/// <returns>True if created successfully, else false</returns>
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;
}
/// <summary>
/// Thin wrapper around QMessageBox::critical() to allow it to be invoked from another thread.
/// </summary>