Commit d939200e authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix a problem of Insert Hold Frames action

We should also "offset" empty cell to make sure the expanding
works correctly.

BUG:396848
parent 616862bf
......@@ -281,7 +281,11 @@ bool KisTimeBasedItemModel::removeFrames(const QModelIndexList &indexes)
return true;
}
KUndo2Command* KisTimeBasedItemModel::createOffsetFramesCommand(QModelIndexList srcIndexes, const QPoint &offset, bool copyFrames, bool moveEmptyFrames, KUndo2Command *parentCommand)
KUndo2Command* KisTimeBasedItemModel::createOffsetFramesCommand(QModelIndexList srcIndexes,
const QPoint &offset,
bool copyFrames,
bool moveEmptyFrames,
KUndo2Command *parentCommand)
{
if (srcIndexes.isEmpty()) return 0;
if (offset.isNull()) return 0;
......
......@@ -920,7 +920,9 @@ bool TimelineFramesModel::insertHoldFrames(QModelIndexList selectedIndexes, int
indexes << index(row, column);
}
createOffsetFramesCommand(indexes, QPoint(plannedFrameMove, 0), false, false, parentCommand.data());
createOffsetFramesCommand(indexes,
QPoint(plannedFrameMove, 0),
false, true, parentCommand.data());
}
const int oldTime = m_d->image->animationInterface()->currentUITime();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment