From: Youngbok Shin Date: Thu, 23 Aug 2018 08:07:48 +0000 (+0900) Subject: lottie: fixed regression caused by last commit X-Git-Tag: submit/tizen/20180917.042405~69 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eea5add913e0b9fd0c2d236541ec5d5f1975a5a5;p=platform%2Fcore%2Fuifw%2Flottie-player.git lottie: fixed regression caused by last commit There was issue caused by item inside of groups. Change-Id: If9057db4f183fc2956d3bd43dca92fc5bb628202 --- diff --git a/src/lottie/lottieitem.cpp b/src/lottie/lottieitem.cpp index 23810d9..84945b6 100644 --- a/src/lottie/lottieitem.cpp +++ b/src/lottie/lottieitem.cpp @@ -589,14 +589,13 @@ void LOTContentGroupItem::processPathItems( list.push_back(pathNode); } else if (auto paintNode = dynamic_cast(i.get())) { // the node is a paint data node update the path list of the paint item. - paintNode->addPathItems(list); + paintNode->addPathItems(list, curOpCount); } else if (auto groupNode = dynamic_cast(i.get())) { // update the groups node with current list groupNode->processPathItems(list); } } - list.erase(list.begin() + curOpCount, list.end()); } void LOTContentGroupItem::processTrimOperation() @@ -800,9 +799,9 @@ void LOTPaintDataItem::renderList(std::vector &list) } -void LOTPaintDataItem::addPathItems(std::vector &list) +void LOTPaintDataItem::addPathItems(std::vector &list, int startOffset) { - mPathItems = list; + std::copy(list.begin() + startOffset, list.end(), back_inserter(mPathItems)); } diff --git a/src/lottie/lottieitem.h b/src/lottie/lottieitem.h index 0af1183..e260d2d 100644 --- a/src/lottie/lottieitem.h +++ b/src/lottie/lottieitem.h @@ -362,7 +362,7 @@ class LOTPaintDataItem : public LOTContentItem { public: LOTPaintDataItem(bool staticContent); - void addPathItems(std::vector &list); + void addPathItems(std::vector &list, int startOffset); virtual void update(int frameNo, const VMatrix &parentMatrix, float parentAlpha, const DirtyFlag &flag); void renderList(std::vector &list) final; protected: