mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 21:20:07 -05:00
Merged mfeemster/fractorium into master
This commit is contained in:
commit
1559a8e779
@ -4410,6 +4410,11 @@
|
||||
<property name="frame">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>101</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>110</string>
|
||||
@ -4665,6 +4670,11 @@
|
||||
<property name="frame">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
@ -5279,6 +5289,11 @@
|
||||
<property name="frame">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
@ -5620,6 +5635,11 @@
|
||||
<property name="frame">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>101</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>110</string>
|
||||
|
@ -400,11 +400,14 @@ void TreePreviewRenderer<T>::PreviewRenderFunc(uint start, uint end)
|
||||
//It is critical that Qt::BlockingQueuedConnection is passed because this is running on a different thread than the UI.
|
||||
//This ensures the events are processed in order as each preview is updated, and that control does not return here
|
||||
//until the update is complete.
|
||||
QMetaObject::invokeMethod(f, "SetLibraryTreeItemData", Qt::BlockingQueuedConnection,
|
||||
Q_ARG(EmberTreeWidgetItemBase*, treeItem),
|
||||
Q_ARG(vv4F&, m_PreviewFinalImage),
|
||||
Q_ARG(uint, PREVIEW_SIZE),
|
||||
Q_ARG(uint, PREVIEW_SIZE));
|
||||
if (m_PreviewRun)
|
||||
{
|
||||
QMetaObject::invokeMethod(f, "SetLibraryTreeItemData", Qt::DirectConnection,
|
||||
Q_ARG(EmberTreeWidgetItemBase*, treeItem),
|
||||
Q_ARG(vv4F&, m_PreviewFinalImage),
|
||||
Q_ARG(uint, PREVIEW_SIZE),
|
||||
Q_ARG(uint, PREVIEW_SIZE));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -625,7 +625,6 @@ public:
|
||||
{
|
||||
m_PreviewRun = false;
|
||||
m_PreviewRenderer.Abort();
|
||||
m_PreviewResult.cancel();
|
||||
m_PreviewResult.waitForFinished();
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,6 @@ void FractoriumEmberController<T>::SyncLibrary(eLibraryUpdate update)
|
||||
{
|
||||
auto it = m_EmberFile.m_Embers.begin();
|
||||
auto tree = m_Fractorium->ui.LibraryTree;
|
||||
tree->blockSignals(true);
|
||||
|
||||
if (auto top = tree->topLevelItem(0))
|
||||
{
|
||||
@ -154,8 +153,6 @@ void FractoriumEmberController<T>::SyncLibrary(eLibraryUpdate update)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tree->blockSignals(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -173,8 +170,7 @@ void FractoriumEmberController<T>::FillLibraryTree(int selectIndex)
|
||||
vector<byte> v(size * size * 4);
|
||||
StopAllPreviewRenderers();
|
||||
tree->clear();
|
||||
QCoreApplication::flush();
|
||||
tree->blockSignals(true);
|
||||
QCoreApplication::processEvents();
|
||||
auto fileItem = new QTreeWidgetItem(tree);
|
||||
QFileInfo info(m_EmberFile.m_Filename);
|
||||
fileItem->setText(0, info.fileName());
|
||||
@ -194,13 +190,10 @@ void FractoriumEmberController<T>::FillLibraryTree(int selectIndex)
|
||||
emberItem->SetImage(v, size, size);
|
||||
}
|
||||
|
||||
tree->blockSignals(false);
|
||||
|
||||
if (selectIndex != -1)
|
||||
m_Fractorium->SelectLibraryItem(selectIndex);
|
||||
|
||||
m_Fractorium->SyncFileCountToSequenceCount();
|
||||
QCoreApplication::flush();
|
||||
RenderLibraryPreviews(0, uint(m_EmberFile.Size()));
|
||||
tree->expandAll();
|
||||
}
|
||||
@ -220,7 +213,6 @@ void FractoriumEmberController<T>::UpdateLibraryTree()
|
||||
{
|
||||
int origChildCount = top->childCount();
|
||||
int i = origChildCount;
|
||||
tree->blockSignals(true);
|
||||
|
||||
for (auto it = Advance(m_EmberFile.m_Embers.begin(), i); it != m_EmberFile.m_Embers.end(); ++it)
|
||||
{
|
||||
@ -238,7 +230,6 @@ void FractoriumEmberController<T>::UpdateLibraryTree()
|
||||
//When adding elements, ensure all indices are sequential.
|
||||
SyncLibrary(eLibraryUpdate::INDEX);
|
||||
m_Fractorium->SyncFileCountToSequenceCount();
|
||||
tree->blockSignals(false);
|
||||
RenderLibraryPreviews(origChildCount, uint(m_EmberFile.Size()));
|
||||
}
|
||||
}
|
||||
@ -277,7 +268,6 @@ void FractoriumEmberController<T>::EmberTreeItemChanged(QTreeWidgetItem* item, i
|
||||
if (oldName == newName)//If nothing changed, nothing to do.
|
||||
return;
|
||||
|
||||
tree->blockSignals(true);
|
||||
emberItem->UpdateEmberName();//Copy edit text to the ember's name variable.
|
||||
m_EmberFile.MakeNamesUnique();//Ensure all names remain unique.
|
||||
SyncLibrary(eLibraryUpdate::NAME);//Copy all ember names to the tree items since some might have changed to be made unique.
|
||||
@ -288,8 +278,6 @@ void FractoriumEmberController<T>::EmberTreeItemChanged(QTreeWidgetItem* item, i
|
||||
m_Ember.m_Name = newName;
|
||||
m_LastSaveCurrent = "";//Reset will force the dialog to show on the next save current since the user probably wants a different name.
|
||||
}
|
||||
|
||||
tree->blockSignals(false);
|
||||
}
|
||||
else if (auto parentItem = dynamic_cast<QTreeWidgetItem*>(item))
|
||||
{
|
||||
@ -433,8 +421,6 @@ void FractoriumEmberController<T>::RenderPreviews(QTreeWidget* tree, TreePreview
|
||||
|
||||
if (start == UINT_MAX && end == UINT_MAX)
|
||||
{
|
||||
tree->blockSignals(true);
|
||||
|
||||
if (auto top = tree->topLevelItem(0))
|
||||
{
|
||||
int childCount = top->childCount();
|
||||
@ -445,7 +431,6 @@ void FractoriumEmberController<T>::RenderPreviews(QTreeWidget* tree, TreePreview
|
||||
treeItem->SetImage(emptyPreview, PREVIEW_SIZE, PREVIEW_SIZE);
|
||||
}
|
||||
|
||||
tree->blockSignals(false);
|
||||
renderer->Render(0, uint(file.Size()));
|
||||
}
|
||||
else
|
||||
@ -490,8 +475,7 @@ void FractoriumEmberController<T>::FillSequenceTree()
|
||||
vector<byte> v(size * size * 4);
|
||||
m_SequencePreviewRenderer->Stop();
|
||||
tree->clear();
|
||||
QCoreApplication::flush();
|
||||
tree->blockSignals(true);
|
||||
QCoreApplication::processEvents();//Having to flush events is usually a sign of poor design. However, in this case, it's critical to have this here, else rapid button clicks will crash.
|
||||
auto fileItem = new QTreeWidgetItem(tree);
|
||||
QFileInfo info(m_SequenceFile.m_Filename);
|
||||
fileItem->setText(0, info.fileName());
|
||||
@ -503,19 +487,18 @@ void FractoriumEmberController<T>::FillSequenceTree()
|
||||
auto emberItem = new EmberTreeWidgetItemBase(fileItem);
|
||||
|
||||
if (it.m_Name.empty())
|
||||
emberItem->setText(0, ToString(i++));
|
||||
emberItem->setText(0, ToString(i));
|
||||
else
|
||||
emberItem->setText(0, it.m_Name.c_str());
|
||||
|
||||
i++;
|
||||
emberItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
|
||||
emberItem->setToolTip(0, emberItem->text(0));
|
||||
emberItem->SetImage(v, size, size);
|
||||
}
|
||||
|
||||
tree->blockSignals(false);
|
||||
QCoreApplication::flush();
|
||||
RenderSequencePreviews(0, uint(m_SequenceFile.Size()));
|
||||
tree->expandAll();
|
||||
RenderSequencePreviews(0, uint(m_SequenceFile.Size()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
||||
fractorium (1.0.0.17a-0ubuntu1) bionic; urgency=low
|
||||
|
||||
* release 1.0.0.17
|
||||
|
||||
-- Matt Feemster <matt.feemster@gmail.com> Fri, 28 Jun 2019 21:04:38 -0700
|
||||
|
||||
fractorium (1.0.0.17-0ubuntu1) bionic; urgency=low
|
||||
|
||||
* release 1.0.0.17
|
||||
|
Loading…
Reference in New Issue
Block a user