Commit 55c39948 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix MLT7 % rect parsing

parent 3dcf8667
Pipeline #58625 failed with stage
in 1 minute and 37 seconds
......@@ -39,11 +39,12 @@ GeometryEditWidget::GeometryEditWidget(std::shared_ptr<AssetParameterModel> mode
const QString value = m_model->data(m_index, AssetParameterModel::ValueRole).toString().simplified();
int start = m_model->data(m_index, AssetParameterModel::ParentInRole).toInt();
int end = start + m_model->data(m_index, AssetParameterModel::ParentDurationRole).toInt();
QSize profileSize = pCore->getCurrentFrameSize();
Mlt::Properties mlt_prop;
m_model->passProperties(mlt_prop);
mlt_prop.set("rect", value.toUtf8().data());
mlt_rect r = mlt_prop.get_rect("rect");
QRect rect = QRect(int(r.x), int(r.y), int(r.w), int(r.h));;
QRect rect = QRect(int(profileSize.width() * r.x), int(profileSize.height() * r.y), int(profileSize.width()* r.w), int(profileSize.height() * r.h));;
if (rect.isNull()) {
// Cannot read value, use random default
rect = QRect(50, 50, 200, 200);
......
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