Fix keyframeable effect params left enabled when selecting a clip, leading to possible crash

parent 3986e1b4
Pipeline #38172 passed with stage
in 26 minutes and 10 seconds
......@@ -26,6 +26,7 @@
#include "assets/view/widgets/abstractparamwidget.hpp"
#include "assets/view/widgets/keyframewidget.hpp"
#include "core.h"
#include "monitor/monitor.h"
#include <QActionGroup>
#include <QDebug>
......@@ -131,6 +132,9 @@ void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &mo
if (addSpacer) {
m_lay->addStretch();
}
// Ensure effect parameters are adjusted to current position
Monitor *monitor = pCore->getMonitor(m_model->monitorId);
emit monitor->seekPosition(monitor->position());
}
QVector<QPair<QString, QVariant>> AssetParameterView::getDefaultValues() const
......
......@@ -163,7 +163,6 @@ KeyframeWidget::KeyframeWidget(std::shared_ptr<AssetParameterModel> model, QMode
m_lay->addWidget(m_keyframeview);
m_lay->addWidget(m_toolbar);
monitorSeek(monitor->position());
connect(m_time, &TimecodeDisplay::timeCodeEditingFinished, this, [&]() { slotSetPosition(-1, true); });
connect(m_keyframeview, &KeyframeView::seekToPos, this, [&](int p) { slotSetPosition(p, true); });
......
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