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

Fix possible UI corruption with xml uis and some animated parameters

parent 9251afeb
Pipeline #259101 failed with stage
in 8 minutes and 42 seconds
......@@ -76,7 +76,7 @@ void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &mo
for (int i = 0; i < model->rowCount(); ++i) {
QModelIndex index = model->index(i, 0);
auto type = model->data(index, AssetParameterModel::TypeRole).value<ParamType>();
if (m_mainKeyframeWidget && (type == ParamType::Geometry || type == ParamType::KeyframeParam || type == ParamType::ColorWheel)) {
if (m_mainKeyframeWidget && (AssetParameterModel::isAnimated(type) || type == ParamType::Geometry)) {
// Keyframe widget can have some extra params that shouldn't build a new widget
qDebug() << "// FOUND ADDED PARAM";
if (type != ParamType::ColorWheel) {
......@@ -264,21 +264,6 @@ MonitorSceneType AssetParameterView::needsMonitorEffectScene() const
return MonitorSceneDefault;
}
/*void AssetParameterView::initKeyframeView()
{
if (m_mainKeyframeWidget) {
m_mainKeyframeWidget->initMonitor();
} else {
for (int i = 0; i < m_model->rowCount(); ++i) {
QModelIndex index = m_model->index(i, 0);
auto type = m_model->data(index, AssetParameterModel::TypeRole).value<ParamType>();
if (type == ParamType::Geometry) {
return MonitorSceneGeometry;
}
}
}
}*/
void AssetParameterView::slotRefresh()
{
refresh(m_model->index(0, 0), m_model->index(m_model->rowCount() - 1, 0), {});
......
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