mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-22 05:30:06 -05:00
--Bug fixes
-Switching between SP and DP before previews had finished would set the current flame back to the first one in the file.
This commit is contained in:
parent
51dbe8e59d
commit
51c1cc7a83
@ -95,7 +95,7 @@ public:
|
|||||||
virtual void OpenAndPrepFiles(const QStringList& filenames, bool append) { }
|
virtual void OpenAndPrepFiles(const QStringList& filenames, bool append) { }
|
||||||
virtual void SaveCurrentAsXml() { }
|
virtual void SaveCurrentAsXml() { }
|
||||||
virtual void SaveEntireFileAsXml() { }
|
virtual void SaveEntireFileAsXml() { }
|
||||||
virtual uint SaveCurrentToOpenedFile() { return 0; }
|
virtual uint SaveCurrentToOpenedFile(bool render = true) { return 0; }
|
||||||
virtual void Undo() { }//Edit.
|
virtual void Undo() { }//Edit.
|
||||||
virtual void Redo() { }
|
virtual void Redo() { }
|
||||||
virtual void CopyXml() { }
|
virtual void CopyXml() { }
|
||||||
@ -339,7 +339,7 @@ public:
|
|||||||
virtual void OpenAndPrepFiles(const QStringList& filenames, bool append) override;
|
virtual void OpenAndPrepFiles(const QStringList& filenames, bool append) override;
|
||||||
virtual void SaveCurrentAsXml() override;
|
virtual void SaveCurrentAsXml() override;
|
||||||
virtual void SaveEntireFileAsXml() override;
|
virtual void SaveEntireFileAsXml() override;
|
||||||
virtual uint SaveCurrentToOpenedFile() override;
|
virtual uint SaveCurrentToOpenedFile(bool render = true) override;
|
||||||
virtual void Undo() override;
|
virtual void Undo() override;
|
||||||
virtual void Redo() override;
|
virtual void Redo() override;
|
||||||
virtual void CopyXml() override;
|
virtual void CopyXml() override;
|
||||||
|
@ -370,8 +370,9 @@ void Fractorium::OnActionSaveCurrentScreen(bool checked)
|
|||||||
/// preview renderer.
|
/// preview renderer.
|
||||||
/// This does not save to disk.
|
/// This does not save to disk.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="render">Whether to re-render the preview thumbnail after saving to the open file. Default: true.</param>
|
||||||
template <typename T>
|
template <typename T>
|
||||||
uint FractoriumEmberController<T>::SaveCurrentToOpenedFile()
|
uint FractoriumEmberController<T>::SaveCurrentToOpenedFile(bool render)
|
||||||
{
|
{
|
||||||
uint i = 0;
|
uint i = 0;
|
||||||
bool fileFound = false;
|
bool fileFound = false;
|
||||||
@ -395,13 +396,13 @@ uint FractoriumEmberController<T>::SaveCurrentToOpenedFile()
|
|||||||
StopPreviewRender();
|
StopPreviewRender();
|
||||||
m_EmberFile.m_Embers.push_back(m_Ember);
|
m_EmberFile.m_Embers.push_back(m_Ember);
|
||||||
m_EmberFile.MakeNamesUnique();
|
m_EmberFile.MakeNamesUnique();
|
||||||
|
|
||||||
|
if (render)
|
||||||
UpdateLibraryTree();
|
UpdateLibraryTree();
|
||||||
}
|
}
|
||||||
else
|
else if (render)
|
||||||
{
|
|
||||||
RenderPreviews(i, i + 1);
|
RenderPreviews(i, i + 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
@ -832,7 +833,7 @@ void Fractorium::OnActionFinalRender(bool checked)
|
|||||||
//First completely stop what the current rendering process is doing.
|
//First completely stop what the current rendering process is doing.
|
||||||
m_Controller->DeleteRenderer();//Delete the renderer, but not the controller.
|
m_Controller->DeleteRenderer();//Delete the renderer, but not the controller.
|
||||||
m_Controller->StopPreviewRender();
|
m_Controller->StopPreviewRender();
|
||||||
m_Controller->SaveCurrentToOpenedFile();//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();
|
m_FinalRenderDialog->show();
|
||||||
}
|
}
|
||||||
|
@ -690,8 +690,8 @@ bool Fractorium::CreateControllerFromOptions()
|
|||||||
if (m_Controller.get())
|
if (m_Controller.get())
|
||||||
{
|
{
|
||||||
scale = m_Controller->LockedScale();
|
scale = m_Controller->LockedScale();
|
||||||
current = m_Controller->SaveCurrentToOpenedFile();
|
m_Controller->StopPreviewRender();//Must stop any previews first, else changing controllers will crash the program and SaveCurrentToOpenedFile() will return 0.
|
||||||
m_Controller->StopPreviewRender();//Must stop any previews first, else changing controllers will crash the program.
|
current = m_Controller->SaveCurrentToOpenedFile(false);
|
||||||
m_Controller->CopyTempPalette(tempPalette);//Convert float to double or save double verbatim;
|
m_Controller->CopyTempPalette(tempPalette);//Convert float to double or save double verbatim;
|
||||||
//Replace below with this once LLVM fixes a crash in their compiler with default lambda parameters.//TODO
|
//Replace below with this once LLVM fixes a crash in their compiler with default lambda parameters.//TODO
|
||||||
//m_Controller->CopyEmber(ed);
|
//m_Controller->CopyEmber(ed);
|
||||||
|
Loading…
Reference in New Issue
Block a user