Commit b644d247 authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

Better speration between animated an non-animated params in UI

Add the keyframe widget with all animated params only at the bottom most
position
parent 23b6e572
......@@ -94,19 +94,25 @@ void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &mo
setFixedHeight(contentHeight());
emit updateHeight();
});
m_lay->addWidget(w);
if (AssetParameterModel::isAnimated(type)) {
m_mainKeyframeWidget = static_cast<KeyframeWidget *>(w);
connect(this, &AssetParameterView::nextKeyframe, m_mainKeyframeWidget, &KeyframeWidget::goToNext);
connect(this, &AssetParameterView::previousKeyframe, m_mainKeyframeWidget, &KeyframeWidget::goToPrevious);
connect(this, &AssetParameterView::addRemoveKeyframe, m_mainKeyframeWidget, &KeyframeWidget::addRemove);
} else {
m_lay->addWidget(w);
minHeight += w->minimumHeight();
}
m_widgets.push_back(w);
}
}
setMinimumHeight(m_mainKeyframeWidget ? m_mainKeyframeWidget->minimumHeight() + minHeight : minHeight);
if (m_mainKeyframeWidget) {
// Add keyframe widget to the bottom to have a clear seperation
// between animated an non-animated params
m_lay->addWidget(m_mainKeyframeWidget);
minHeight += m_mainKeyframeWidget->minimumHeight();
}
setMinimumHeight(minHeight);
if (addSpacer) {
m_lay->addStretch();
}
......
Supports Markdown
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