QmlDesigner: Fix curveditor playhead update issues

Change-Id: I04b3502395f0b0b25bca785acf220f69ba3428bf
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Knud Dollereder
2024-04-16 15:08:02 +02:00
parent 4591293fd9
commit 3e42b144ba
2 changed files with 3 additions and 1 deletions

View File

@@ -77,8 +77,8 @@ CurveEditor::CurveEditor(CurveEditorModel *model, QWidget *parent)
connect(m_toolbar, &CurveEditorToolBar::currentFrameChanged, [this, model](int frame) { connect(m_toolbar, &CurveEditorToolBar::currentFrameChanged, [this, model](int frame) {
model->setCurrentFrame(frame); model->setCurrentFrame(frame);
m_view->setCurrentFrame(frame, false);
updateStatusLine(); updateStatusLine();
m_view->viewport()->update();
}); });
connect(m_toolbar, &CurveEditorToolBar::zoomChanged, [this](double zoom) { connect(m_toolbar, &CurveEditorToolBar::zoomChanged, [this](double zoom) {

View File

@@ -129,6 +129,8 @@ CurveEditorToolBar::CurveEditorToolBar(CurveEditorModel *model, QWidget* parent)
m_currentSpin->setFrame(false); m_currentSpin->setFrame(false);
connect(m_currentSpin, &QSpinBox::valueChanged, this, &CurveEditorToolBar::currentFrameChanged); connect(m_currentSpin, &QSpinBox::valueChanged, this, &CurveEditorToolBar::currentFrameChanged);
connect(model, &CurveEditorModel::commitCurrentFrame,
this, [this](int frame) { m_currentSpin->setValue(frame); });
addSpacer(); addSpacer();