mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-05 15:54:50 -04:00
--User changes
-Remove the option --intpalette to format the palette in the xml as ints. If they are not hex formatted, then they should always be float. This option was pointless. -Cleanup some options text for the command line programs. -Allow for dragging around flames in the library tab. This is useful for setting up the order of an animation. -Make the opening of large files in Fractorium much more efficient when not-appending. -Make the opening of large files in all EmberRender and EmberAnimate more efficient. -Better error reporting when opening files. --Bug fixes -Get rid of leftover artifacts that would appear on preview thumbnails when either switching SP/DP or re-rendering previews. -Filename extension was not being appended on Linux when saving as Xml, thus making it impossible to drag that file back in becase drop is filtered on extension. --Code changes -Move GCC compiler spec to C++14. Building with 5.3 now on linux. -Use inline member data initializers. -Make a #define for static for use in Utils.h to make things a little cleaner. -Make various functions able to take arbitrary collections as their parameters rather than just vectors. -Make library collection a list rather than vector. This alleviates the need to re-sync pointers whenever the collection changes. -Subclass QTreeWidget for the library tree. Two new files added for this. -Remove all usage of #ifdef ROW_ONLY_DE in DEOpenCLKernelCreator, it was never used. -Add move constructor and assignment operator to EmberFile. -Add the ability to use a pointer to outside memory in the renderer for the vector of Ember<T>. -Make a lot more functions const where they should be.
This commit is contained in:
@ -140,7 +140,7 @@ Fractorium::Fractorium(QWidget* p)
|
||||
connect(ui.LibraryDockWidget, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)), this, SLOT(dockLocationChanged(Qt::DockWidgetArea)));
|
||||
connect(ui.LibraryDockWidget, SIGNAL(topLevelChanged(bool)), this, SLOT(OnDockTopLevelChanged(bool)));
|
||||
|
||||
//Always ensure the library tab is selected, which will show preview renders.
|
||||
//Always ensure the library tab is selected if not restoring, which will show preview renders.
|
||||
if (!restored)
|
||||
{
|
||||
ui.LibraryDockWidget->raise();
|
||||
@ -298,6 +298,7 @@ void Fractorium::dockLocationChanged(Qt::DockWidgetArea area)
|
||||
/// Event filter for taking special action on:
|
||||
/// Dock widget resize events, which in turn trigger GLParentScrollArea events.
|
||||
/// Library tree key events, specifically delete.
|
||||
/// Library tree drag n drop events.
|
||||
/// </summary>
|
||||
/// <param name="o">The object</param>
|
||||
/// <param name="e">The eevent</param>
|
||||
@ -309,7 +310,7 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
|
||||
m_WidthSpin->DoubleClickNonZero(ui.GLParentScrollArea->width());
|
||||
m_HeightSpin->DoubleClickNonZero(ui.GLParentScrollArea->height());
|
||||
}
|
||||
else if (QKeyEvent* ke = dynamic_cast<QKeyEvent*>(e))
|
||||
else if (auto ke = dynamic_cast<QKeyEvent*>(e))
|
||||
{
|
||||
bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
|
||||
|
||||
@ -499,7 +500,7 @@ QStringList Fractorium::SetupOpenXmlDialog()
|
||||
|
||||
QStringList filenames;
|
||||
m_FileDialog->disconnect(SIGNAL(filterSelected(const QString&)));
|
||||
connect(m_FileDialog, &QFileDialog::filterSelected, [ = ](const QString & filter) { m_Settings->OpenXmlExt(filter); });
|
||||
connect(m_FileDialog, &QFileDialog::filterSelected, [&](const QString & filter) { m_Settings->OpenXmlExt(filter); });
|
||||
m_FileDialog->setFileMode(QFileDialog::ExistingFiles);
|
||||
m_FileDialog->setAcceptMode(QFileDialog::AcceptOpen);
|
||||
m_FileDialog->setNameFilter("Flam3 (*.flam3);;Flame (*.flame);;Xml (*.xml)");
|
||||
@ -527,6 +528,7 @@ QStringList Fractorium::SetupOpenXmlDialog()
|
||||
QString Fractorium::SetupSaveXmlDialog(const QString& defaultFilename)
|
||||
{
|
||||
//Lazy instantiate since it takes a long time.
|
||||
//QS
|
||||
if (!m_FileDialog)
|
||||
{
|
||||
m_FileDialog = new QFileDialog(this);
|
||||
@ -538,7 +540,7 @@ QString Fractorium::SetupSaveXmlDialog(const QString& defaultFilename)
|
||||
|
||||
QString filename;
|
||||
m_FileDialog->disconnect(SIGNAL(filterSelected(const QString&)));
|
||||
connect(m_FileDialog, &QFileDialog::filterSelected, [ = ](const QString & filter) { m_Settings->SaveXmlExt(filter); });
|
||||
connect(m_FileDialog, &QFileDialog::filterSelected, [&](const QString & filter) { m_Settings->SaveXmlExt(filter); });
|
||||
//This must come first because it clears various internal states which allow the file text to be properly set.
|
||||
//This is most likely a bug in QFileDialog.
|
||||
m_FileDialog->setAcceptMode(QFileDialog::AcceptSave);
|
||||
@ -549,7 +551,19 @@ QString Fractorium::SetupSaveXmlDialog(const QString& defaultFilename)
|
||||
m_FileDialog->selectNameFilter(m_Settings->SaveXmlExt());
|
||||
|
||||
if (m_FileDialog->exec() == QDialog::Accepted)
|
||||
{
|
||||
filename = m_FileDialog->selectedFiles().value(0);
|
||||
//For some reason, linux doesn't automatically append this, but Windows does. Force it to be safe.
|
||||
auto filt = m_FileDialog->selectedNameFilter().split('*');//Qt makes it very hard to get the actual extension used.
|
||||
|
||||
if (filt.size() > 1)//Should always be true.
|
||||
{
|
||||
auto s = filt[1].replace(")", "");
|
||||
|
||||
if (!filename.endsWith(s))
|
||||
filename.append(s);
|
||||
}
|
||||
}
|
||||
|
||||
return filename;
|
||||
}
|
||||
@ -574,7 +588,7 @@ QString Fractorium::SetupSaveImageDialog(const QString& defaultFilename)
|
||||
|
||||
QString filename;
|
||||
m_FileDialog->disconnect(SIGNAL(filterSelected(const QString&)));
|
||||
connect(m_FileDialog, &QFileDialog::filterSelected, [ = ](const QString & filter) { m_Settings->SaveImageExt(filter); });
|
||||
connect(m_FileDialog, &QFileDialog::filterSelected, [&](const QString & filter) { m_Settings->SaveImageExt(filter); });
|
||||
//This must come first because it clears various internal states which allow the file text to be properly set.
|
||||
//This is most likely a bug in QFileDialog.
|
||||
m_FileDialog->setAcceptMode(QFileDialog::AcceptSave);
|
||||
|
Reference in New Issue
Block a user