Skip to content

Commit

Permalink
Update timelinedockwidget.cpp
Browse files Browse the repository at this point in the history
Make current frame spinbox read only.

Use command palette instead (it will not break focus like the spinbox does).
  • Loading branch information
rodlie committed Jul 26, 2024
1 parent 229ab58 commit 07deae5
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/app/GUI/timelinedockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,10 @@ TimelineDockWidget::TimelineDockWidget(Document& document,
mCurrentFrameSpin->setKeyboardTracking(false);
mCurrentFrameSpin->setAlignment(Qt::AlignHCenter);
mCurrentFrameSpin->setObjectName(QString::fromUtf8("SpinBoxNoButtons"));
mCurrentFrameSpin->setFocusPolicy(Qt::ClickFocus);
mCurrentFrameSpin->setFocusPolicy(Qt::NoFocus);
mCurrentFrameSpin->setToolTip(tr("Current frame"));
mCurrentFrameSpin->setRange(-INT_MAX, INT_MAX);
connect(mCurrentFrameSpin,
&QSpinBox::editingFinished,
this, [this]() {
const auto scene = *mDocument.fActiveScene;
if (!scene) { return; }
scene->anim_setAbsFrame(mCurrentFrameSpin->value());
mDocument.actionFinished();
});
mCurrentFrameSpin->setReadOnly(true);

const auto mPrevKeyframeAct = new QAction(QIcon::fromTheme("prev_keyframe"),
QString(),
Expand Down

0 comments on commit 07deae5

Please sign in to comment.