Skip to content

Commit

Permalink
Do not make a new keyframe if double clicking on an existing keyframe (
Browse files Browse the repository at this point in the history
…#1851)

* Do not make a new keyframe if double clicking on a keyframe

* Only scrub when we create a new keyframe

---------

Co-authored-by: MrStevns <[email protected]>
  • Loading branch information
khoidauminh and MrStevns authored Jul 20, 2024
1 parent bbec7bb commit bfe2349
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/timelinecells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1130,8 +1130,11 @@ void TimeLineCells::mouseDoubleClickEvent(QMouseEvent* event)
{
if (mType == TIMELINE_CELL_TYPE::Tracks && (layerNumber != -1) && (frameNumber > 0) && layerNumber < mEditor->object()->getLayerCount())
{
mEditor->scrubTo(frameNumber);
emit insertNewKeyFrame();
if (!layer->keyExistsWhichCovers(frameNumber))
{
mEditor->scrubTo(frameNumber);
emit insertNewKeyFrame();
}

// The release event will toggle the frame on again, so we make sure it gets
// deselected now instead.
Expand Down

0 comments on commit bfe2349

Please sign in to comment.