From 7a343606b4d1ed25256f4f437c184efc2de244b7 Mon Sep 17 00:00:00 2001 From: Person Date: Thu, 21 Dec 2017 20:09:08 -0800 Subject: [PATCH] --Bug fixes -Fix crash when creating a dummy renderer when showing the final render dialog. -Fix default tab size with new version of Qt. --- Builds/MSVC/Installer/Product.wxs | 2 +- Data/Version History.txt | 8 ++++++-- Data/dark_windows.qss | 2 +- Source/Fractorium/FractoriumCommon.h | 2 +- Source/Fractorium/FractoriumEmberController.h | 3 ++- Source/Fractorium/FractoriumRender.cpp | 7 +++++-- Source/Fractorium/FractoriumXforms.cpp | 4 ++-- 7 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Builds/MSVC/Installer/Product.wxs b/Builds/MSVC/Installer/Product.wxs index 82a7b3c..e105753 100644 --- a/Builds/MSVC/Installer/Product.wxs +++ b/Builds/MSVC/Installer/Product.wxs @@ -13,7 +13,7 @@ - + >& devices, bool updatePreviews, bool shared = true) { return false; } virtual uint SizeOfT() const { return 0; } virtual void ClearUndo() { } + virtual void DeleteRenderer() { } virtual GLEmberControllerBase* GLController() { return nullptr; } bool RenderTimerRunning(); void StartRenderTimer(); @@ -251,7 +252,6 @@ public: void ClearFinalImages(); void Shutdown(); void UpdateRender(eProcessAction action = eProcessAction::FULL_RENDER); - void DeleteRenderer(); void SaveCurrentRender(const QString& filename, const EmberImageComments& comments, vector& pixels, size_t width, size_t height, bool png16Bit, bool transparency); RendererBase* Renderer() { return m_Renderer.get(); } vector* FinalImage() { return &(m_FinalImage); } @@ -515,6 +515,7 @@ public: virtual int ProgressFunc(Ember& ember, void* foo, double fraction, int stage, double etaMs) override; virtual void ClearUndo() override; virtual GLEmberControllerBase* GLController() override { return m_GLController.get(); } + virtual void DeleteRenderer() override; private: //Embers. diff --git a/Source/Fractorium/FractoriumRender.cpp b/Source/Fractorium/FractoriumRender.cpp index ad24823..e46dd75 100644 --- a/Source/Fractorium/FractoriumRender.cpp +++ b/Source/Fractorium/FractoriumRender.cpp @@ -93,11 +93,14 @@ void FractoriumEmberControllerBase::UpdateRender(eProcessAction action) /// /// Call Shutdown() then delete the renderer and clear the textures in the output window if there is one. +/// Note the name is somewhat misleading because a new empty renderer is actually created as a placeholder. +/// This is that the program won't crash if the user adjusts any of the controls while the renderer is shut down. /// -void FractoriumEmberControllerBase::DeleteRenderer() +template +void FractoriumEmberController::DeleteRenderer() { Shutdown(); - m_Renderer = make_unique>(); + m_Renderer = make_unique>(); if (GLController()) GLController()->ClearWindow(); diff --git a/Source/Fractorium/FractoriumXforms.cpp b/Source/Fractorium/FractoriumXforms.cpp index 26534a7..ebe2811 100644 --- a/Source/Fractorium/FractoriumXforms.cpp +++ b/Source/Fractorium/FractoriumXforms.cpp @@ -120,8 +120,8 @@ void Fractorium::OnAddXformButtonClicked(bool checked) { m_Controller->AddXform( /// From: All xaos values from the current xform are zero when going to any xform but the new one added, which is 1. /// To: The xaos value coming from the current xform is 1 and the xaos values from all other xforms are 0, when going to the newly added xform. /// Take different action when a single xform is selected vs. multiple. -/// Single: Copy current xform's xaos values to the new one. -/// Multiple: Set new xform's xaos values to 1, and except the last entry which is 0. +/// Single: Copy the current xform's xaos values to the new one. +/// Multiple: Set the new xform's xaos values to 1, and except the last entry which is 0. /// Called when the add xform button is clicked. /// Resets the rendering process. ///