From e46778ee8d84850cb29758a1009e84a65b80f8a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Sun, 5 Jan 2025 00:33:25 +0100 Subject: [PATCH] Update timelinedockwidget.cpp Re-enable current frame spinbox edit. * https://github.com/friction2d/friction/commit/07deae5977917134978c4d4d985cefe8b0fcc3e7 * https://github.com/friction2d/friction/pull/406 --- src/app/GUI/timelinedockwidget.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/GUI/timelinedockwidget.cpp b/src/app/GUI/timelinedockwidget.cpp index 7e28251c7..6dfb92f5b 100644 --- a/src/app/GUI/timelinedockwidget.cpp +++ b/src/app/GUI/timelinedockwidget.cpp @@ -192,10 +192,17 @@ TimelineDockWidget::TimelineDockWidget(Document& document, mCurrentFrameSpin->setKeyboardTracking(false); mCurrentFrameSpin->setAlignment(Qt::AlignHCenter); mCurrentFrameSpin->setObjectName(QString::fromUtf8("SpinBoxNoButtons")); - mCurrentFrameSpin->setFocusPolicy(Qt::NoFocus); + mCurrentFrameSpin->setFocusPolicy(Qt::ClickFocus); mCurrentFrameSpin->setToolTip(tr("Current frame")); mCurrentFrameSpin->setRange(-INT_MAX, INT_MAX); - mCurrentFrameSpin->setReadOnly(true); + connect(mCurrentFrameSpin, + &QSpinBox::editingFinished, + this, [this]() { + const auto scene = *mDocument.fActiveScene; + if (!scene) { return; } + scene->anim_setAbsFrame(mCurrentFrameSpin->value()); + mDocument.actionFinished(); + }); const auto mPrevKeyframeAct = new QAction(QIcon::fromTheme("prev_keyframe"), QString(),