forked from qt-creator/qt-creator
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:
@@ -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) {
|
||||||
|
@@ -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();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user