From dfecf07d9441820a58f2311db0ae3c6611df51cd Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Mon, 13 Aug 2018 13:43:19 +0900 Subject: [PATCH] lottie/player: call setPos() only if size is already set. Change-Id: If08c49c398d6d8d90ab845020108b368ea204505 --- src/lottie/lottieplayer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lottie/lottieplayer.cpp b/src/lottie/lottieplayer.cpp index 382bf2c..f3ca324 100644 --- a/src/lottie/lottieplayer.cpp +++ b/src/lottie/lottieplayer.cpp @@ -119,9 +119,10 @@ bool LOTPlayerPrivate::setFilePath(std::string path) if (loader.load(path)) { mModel = loader.model(); mCompItem = std::make_unique(mModel.get()); - if (!mSize.isEmpty()) + if (!mSize.isEmpty()) { setSize(mSize); - setPos(0); + setPos(0); + } return true; } return false; -- 2.7.4