Commit 273f1238 authored by Julius Künzel's avatar Julius Künzel
Browse files

Fix "adjustcenter" asset param in case where the frame size is empty

Fixes #1164
parent 00cad95d
......@@ -701,8 +701,8 @@ QVariant AssetParameterModel::parseAttribute(const ObjectId &owner, const QStrin
std::unique_ptr<ProfileModel> &profile = pCore->getCurrentProfile();
int width = profile->width();
int height = profile->height();
if(type == ParamType::AnimatedRect && content == "adjustcenter") {
QSize frameSize = pCore->getItemFrameSize(owner);
QSize frameSize = pCore->getItemFrameSize(owner);
if(type == ParamType::AnimatedRect && content == "adjustcenter" && !frameSize.isEmpty()) {
int contentHeight;
int contentWidth;
double sourceDar = frameSize.width() / frameSize.height();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment