mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-02-01 10:30:08 -05:00
--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:
parent
7ced17a6b2
commit
96d72004fc
@ -9,7 +9,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
$benchprefix = "./bench/"
|
$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
|
$cpuquality = 150
|
||||||
$gpuquality = 2000
|
$gpuquality = 2000
|
||||||
$verbose = "--verbose"
|
$verbose = "--verbose"
|
||||||
|
@ -65,7 +65,6 @@ Fractorium::Fractorium(QWidget* p)
|
|||||||
m_ColorDialog = new QColorDialog(this);
|
m_ColorDialog = new QColorDialog(this);
|
||||||
m_Settings = FractoriumSettings::Instance();
|
m_Settings = FractoriumSettings::Instance();
|
||||||
m_QssDialog = new QssDialog(this);
|
m_QssDialog = new QssDialog(this);
|
||||||
m_FinalRenderDialog = new FractoriumFinalRenderDialog(this);
|
|
||||||
m_OptionsDialog = new FractoriumOptionsDialog(this);
|
m_OptionsDialog = new FractoriumOptionsDialog(this);
|
||||||
m_VarDialog = new FractoriumVariationsDialog(this);
|
m_VarDialog = new FractoriumVariationsDialog(this);
|
||||||
m_AboutDialog = new FractoriumAboutDialog(this);
|
m_AboutDialog = new FractoriumAboutDialog(this);
|
||||||
@ -789,6 +788,30 @@ QString Fractorium::SetupSaveFolderDialog()
|
|||||||
return filename;
|
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>
|
/// <summary>
|
||||||
/// Thin wrapper around QMessageBox::critical() to allow it to be invoked from another thread.
|
/// Thin wrapper around QMessageBox::critical() to allow it to be invoked from another thread.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -458,6 +458,7 @@ private:
|
|||||||
QString SetupSaveXmlDialog(const QString& defaultFilename);
|
QString SetupSaveXmlDialog(const QString& defaultFilename);
|
||||||
QString SetupSaveImageDialog(const QString& defaultFilename);
|
QString SetupSaveImageDialog(const QString& defaultFilename);
|
||||||
QString SetupSaveFolderDialog();
|
QString SetupSaveFolderDialog();
|
||||||
|
bool SetupFinalRenderDialog();
|
||||||
QColorDialog* m_ColorDialog = nullptr;
|
QColorDialog* m_ColorDialog = nullptr;
|
||||||
FractoriumFinalRenderDialog* m_FinalRenderDialog = nullptr;
|
FractoriumFinalRenderDialog* m_FinalRenderDialog = nullptr;
|
||||||
FractoriumOptionsDialog* m_OptionsDialog = nullptr;
|
FractoriumOptionsDialog* m_OptionsDialog = nullptr;
|
||||||
|
@ -755,7 +755,10 @@ void Fractorium::OnSequenceRenderButtonClicked(bool checked)
|
|||||||
m_Controller->StopAllPreviewRenderers();
|
m_Controller->StopAllPreviewRenderers();
|
||||||
m_Controller->SaveCurrentToOpenedFile(false);//Save whatever was edited back to the current open file.
|
m_Controller->SaveCurrentToOpenedFile(false);//Save whatever was edited back to the current open file.
|
||||||
m_RenderStatusLabel->setText("Renderer stopped.");
|
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.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ void Fractorium::InitMenusUI()
|
|||||||
connect(ui.ActionStopRenderingPreviews, SIGNAL(triggered(bool)), this, SLOT(OnActionStopRenderingPreviews(bool)), Qt::QueuedConnection);
|
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.ActionRenderPreviews, SIGNAL(triggered(bool)), this, SLOT(OnActionRenderPreviews(bool)), Qt::QueuedConnection);
|
||||||
connect(ui.ActionFinalRender, SIGNAL(triggered(bool)), this, SLOT(OnActionFinalRender(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);
|
connect(ui.ActionOptions, SIGNAL(triggered(bool)), this, SLOT(OnActionOptions(bool)), Qt::QueuedConnection);
|
||||||
//Help menu.
|
//Help menu.
|
||||||
connect(ui.ActionAbout, SIGNAL(triggered(bool)), this, SLOT(OnActionAbout(bool)), Qt::QueuedConnection);
|
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->StopAllPreviewRenderers();
|
||||||
m_Controller->SaveCurrentToOpenedFile(false);//Save whatever was edited back to the current open file.
|
m_Controller->SaveCurrentToOpenedFile(false);//Save whatever was edited back to the current open file.
|
||||||
m_RenderStatusLabel->setText("Renderer stopped.");
|
m_RenderStatusLabel->setText("Renderer stopped.");
|
||||||
m_FinalRenderDialog->Show(false);
|
SetupFinalRenderDialog();
|
||||||
|
|
||||||
|
if (m_FinalRenderDialog)
|
||||||
|
m_FinalRenderDialog->Show(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -949,6 +951,8 @@ void Fractorium::OnFinalRenderClose(int result)
|
|||||||
StartRenderTimer(false);//Re-create the renderer and start rendering again.
|
StartRenderTimer(false);//Re-create the renderer and start rendering again.
|
||||||
ui.ActionStartStopRenderer->setChecked(false);//Re-enable any controls that might have been disabled.
|
ui.ActionStartStopRenderer->setChecked(false);//Re-enable any controls that might have been disabled.
|
||||||
OnActionStartStopRenderer(false);
|
OnActionStartStopRenderer(false);
|
||||||
|
delete m_FinalRenderDialog;
|
||||||
|
m_FinalRenderDialog = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -701,7 +701,10 @@ bool Fractorium::CreateRendererFromOptions(bool updatePreviews)
|
|||||||
ui.ActionCopyKernel->setEnabled(false);
|
ui.ActionCopyKernel->setEnabled(false);
|
||||||
m_OptionsDialog->ui.OpenCLCheckBox->setChecked(false);
|
m_OptionsDialog->ui.OpenCLCheckBox->setChecked(false);
|
||||||
m_OptionsDialog->ui.SharedTextureCheckBox->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;
|
ok = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user