diff --git a/Source/Fractorium/EmberTreeWidgetItem.h b/Source/Fractorium/EmberTreeWidgetItem.h
index 1187977..0fb5996 100644
--- a/Source/Fractorium/EmberTreeWidgetItem.h
+++ b/Source/Fractorium/EmberTreeWidgetItem.h
@@ -47,7 +47,7 @@ public:
/// The height of the image in pixels
void SetImage(vector& v, uint width, uint height)
{
- constexpr auto size = 64;
+ constexpr auto size = PREVIEW_SIZE;
m_Image = QImage(width, height, QImage::Format_RGBA8888);
memcpy(m_Image.scanLine(0), v.data(), SizeOf(v));//Memcpy the data in.
m_Pixmap = QPixmap::fromImage(m_Image).scaled(QSize(size, size), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);//Create a QPixmap out of the QImage, scaled to size.
diff --git a/Source/Fractorium/FractoriumEmberController.h b/Source/Fractorium/FractoriumEmberController.h
index 65c6eb4..a7d0d95 100644
--- a/Source/Fractorium/FractoriumEmberController.h
+++ b/Source/Fractorium/FractoriumEmberController.h
@@ -32,7 +32,7 @@ class Fractorium;
template class PreviewRenderer;
template class TreePreviewRenderer;
-#define PREVIEW_SIZE 256
+#define PREVIEW_SIZE 128
#define UNDO_SIZE 512
///
diff --git a/Source/Fractorium/FractoriumLibrary.cpp b/Source/Fractorium/FractoriumLibrary.cpp
index 8616a4b..72a7f9d 100644
--- a/Source/Fractorium/FractoriumLibrary.cpp
+++ b/Source/Fractorium/FractoriumLibrary.cpp
@@ -176,18 +176,18 @@ void FractoriumEmberController::SyncLibrary(eLibraryUpdate update)
template
void FractoriumEmberController::FillLibraryTree(int selectIndex)
{
- uint size = 64;
- uint i = 0;
- const auto tree = m_Fractorium->ui.LibraryTree;
+ const uint size = PREVIEW_SIZE;
vector v(size * size * 4);
- StopAllPreviewRenderers();
+ const auto tree = m_Fractorium->ui.LibraryTree;
tree->clear();
+ StopAllPreviewRenderers();
auto fileItem = new QTreeWidgetItem(tree);
QFileInfo info(m_EmberFile.m_Filename);
fileItem->setText(0, info.fileName());
fileItem->setToolTip(0, m_EmberFile.m_Filename);
fileItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable | Qt::ItemIsDropEnabled);
+ uint i = 0;
for (auto& it : m_EmberFile.m_Embers)
{
auto emberItem = new EmberTreeWidgetItem(&it, fileItem);
@@ -216,7 +216,7 @@ void FractoriumEmberController::FillLibraryTree(int selectIndex)
template
void FractoriumEmberController::UpdateLibraryTree()
{
- const uint size = 64;
+ const uint size = PREVIEW_SIZE;
vector v(size * size * 4);
const auto tree = m_Fractorium->ui.LibraryTree;
@@ -479,18 +479,18 @@ void FractoriumEmberController::StopAllPreviewRenderers()
template
void FractoriumEmberController::FillSequenceTree()
{
- const uint size = 64;
- uint i = 0;
- const auto tree = m_Fractorium->ui.SequenceTree;
+ const uint size = PREVIEW_SIZE;
vector v(size * size * 4);
- m_SequencePreviewRenderer->Stop();
+ const auto tree = m_Fractorium->ui.SequenceTree;
tree->clear();
+ StopAllPreviewRenderers();
auto fileItem = new QTreeWidgetItem(tree);
QFileInfo info(m_SequenceFile.m_Filename);
fileItem->setText(0, info.fileName());
fileItem->setToolTip(0, m_SequenceFile.m_Filename);
fileItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable);
+ uint i = 0;
for (auto& it : m_SequenceFile.m_Embers)
{
auto emberItem = new EmberTreeWidgetItemBase(fileItem);