From 01b681ccccfb36d04a3baf1accc6b45befacb709 Mon Sep 17 00:00:00 2001 From: manongjohn Date: Tue, 15 Mar 2022 08:45:20 -0400 Subject: [PATCH] Fix level's custom styles not loading --- .../common/tvrender/tsimplecolorstyles.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/toonz/sources/common/tvrender/tsimplecolorstyles.cpp b/toonz/sources/common/tvrender/tsimplecolorstyles.cpp index 92e7a474..3f0d0eeb 100644 --- a/toonz/sources/common/tvrender/tsimplecolorstyles.cpp +++ b/toonz/sources/common/tvrender/tsimplecolorstyles.cpp @@ -955,7 +955,14 @@ TRasterImagePatternStrokeStyle::TRasterImagePatternStrokeStyle( //----------------------------------------------------------------------------- TColorStyle *TRasterImagePatternStrokeStyle::clone() const { - return new TRasterImagePatternStrokeStyle(*this); + TRasterImagePatternStrokeStyle *theClone = + new TRasterImagePatternStrokeStyle(); + theClone->m_level = this->m_level; + theClone->m_name = this->m_name; + theClone->m_space = this->m_space; + theClone->m_rotation = this->m_rotation; + if (!this->m_basePath.isEmpty()) theClone->m_basePath = this->m_basePath; + return theClone; } //----------------------------------------------------------------------------- @@ -1367,7 +1374,14 @@ TVectorImagePatternStrokeStyle::TVectorImagePatternStrokeStyle( //----------------------------------------------------------------------------- TColorStyle *TVectorImagePatternStrokeStyle::clone() const { - return new TVectorImagePatternStrokeStyle(*this); + TVectorImagePatternStrokeStyle *theClone = + new TVectorImagePatternStrokeStyle(); + theClone->m_level = this->m_level; + theClone->m_name = this->m_name; + theClone->m_space = this->m_space; + theClone->m_rotation = this->m_rotation; + if (!this->m_basePath.isEmpty()) theClone->m_basePath = this->m_basePath; + return theClone; } //-----------------------------------------------------------------------------