mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-13 03:38:17 -04:00
--User changes
-Edits will not save back to the file in memory on render completion when preview renderer is running. --Bug fixes -dc_perlin was crashing on Nvidia when using SP. -Duplicate images were randomly getting added to the file in memory. -Crash when opening an Xml with less than 2 flames in it. --Code changes -Use raw array of floats in OpenCL for perlin noise, rather than float3/double3. -Add some default cases to dc_perlin. -Redo singleton pattern yet again. Deriving from a templated Singleton<T> class was creating a separate instance per module. Now only one instance of each type will ever be created and it will be wrapped in a shared_ptr which guarantees its deletion as main() exits.
This commit is contained in:
@ -128,26 +128,26 @@ void FractoriumVariationsDialog::OnSelectNoneButtonClicked(bool checked)
|
||||
void FractoriumVariationsDialog::Populate()
|
||||
{
|
||||
auto table = ui.VariationsTable;
|
||||
int size = int(std::max<size_t>(std::max<size_t>(m_VariationList.RegSize(), m_VariationList.PreSize()), m_VariationList.PostSize()));
|
||||
int size = int(std::max<size_t>(std::max<size_t>(m_VariationList->RegSize(), m_VariationList->PreSize()), m_VariationList->PostSize()));
|
||||
table->setRowCount(size);
|
||||
|
||||
for (auto i = 0; i < size; i++)
|
||||
{
|
||||
if (auto pre = m_VariationList.GetVariation(i, eVariationType::VARTYPE_PRE))
|
||||
if (auto pre = m_VariationList->GetVariation(i, eVariationType::VARTYPE_PRE))
|
||||
{
|
||||
auto cb = new QTableWidgetItem(pre->Name().c_str());
|
||||
table->setItem(i, 0, cb);
|
||||
SetCheckFromMap(cb, pre);
|
||||
}
|
||||
|
||||
if (auto reg = m_VariationList.GetVariation(i, eVariationType::VARTYPE_REG))
|
||||
if (auto reg = m_VariationList->GetVariation(i, eVariationType::VARTYPE_REG))
|
||||
{
|
||||
auto cb = new QTableWidgetItem(reg->Name().c_str());
|
||||
table->setItem(i, 1, cb);
|
||||
SetCheckFromMap(cb, reg);
|
||||
}
|
||||
|
||||
if (auto post = m_VariationList.GetVariation(i, eVariationType::VARTYPE_POST))
|
||||
if (auto post = m_VariationList->GetVariation(i, eVariationType::VARTYPE_POST))
|
||||
{
|
||||
auto cb = new QTableWidgetItem(post->Name().c_str());
|
||||
table->setItem(i, 2, cb);
|
||||
@ -209,7 +209,7 @@ void FractoriumVariationsDialog::DataToGui()
|
||||
{
|
||||
ForEachCell([&](QTableWidgetItem * cb)
|
||||
{
|
||||
if (auto var = m_VariationList.GetVariation(cb->text().toStdString()))
|
||||
if (auto var = m_VariationList->GetVariation(cb->text().toStdString()))
|
||||
SetCheckFromMap(cb, var);
|
||||
});
|
||||
}
|
||||
@ -221,7 +221,7 @@ void FractoriumVariationsDialog::GuiToData()
|
||||
{
|
||||
ForEachCell([&](QTableWidgetItem * cb)
|
||||
{
|
||||
if (auto var = m_VariationList.GetVariation(cb->text().toStdString()))
|
||||
if (auto var = m_VariationList->GetVariation(cb->text().toStdString()))
|
||||
m_Vars[cb->text()] = (cb->checkState() == Qt::Checked);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user