Commit 3ab6191c authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Make it easier to drag a same track composition (include snapping point)

parent 4776ff5b
Pipeline #121360 passed with stage
in 6 minutes and 42 seconds
......@@ -2390,8 +2390,9 @@ int TrackModel::isOnCut(int cid)
{
if (auto ptr = m_parent.lock()) {
std::shared_ptr<CompositionModel> composition = ptr->getCompositionPtr(cid);
int startPos = composition->getPosition();
int endPos = startPos + composition->getPlaytime() - 1;
// Start and end pos are incremented by 1 to account snapping
int startPos = composition->getPosition() - 1;
int endPos = startPos + composition->getPlaytime() + 1;
int cid1 = getClipByPosition(startPos);
int cid2 = getClipByPosition(endPos);
if (cid1 == -1 || cid2 == -1 || cid1 == cid2) {
......
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