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

Fix razor tool cutting wrong clip. Fixes #380

parent fdfb1e51
Pipeline #9194 passed with stage
in 22 minutes and 12 seconds
...@@ -1045,15 +1045,17 @@ void TimelineController::cutClipUnderCursor(int position, int track) ...@@ -1045,15 +1045,17 @@ void TimelineController::cutClipUnderCursor(int position, int track)
QMutexLocker lk(&m_metaMutex); QMutexLocker lk(&m_metaMutex);
bool foundClip = false; bool foundClip = false;
const auto selection = m_model->getCurrentSelection(); const auto selection = m_model->getCurrentSelection();
for (int cid : selection) { if (track == -1) {
if (m_model->isClip(cid)) { for (int cid : selection) {
if (TimelineFunctions::requestClipCut(m_model, cid, position)) { if (m_model->isClip(cid)) {
foundClip = true; if (TimelineFunctions::requestClipCut(m_model, cid, position)) {
// Cutting clips in the selection group is handled in TimelineFunctions foundClip = true;
break; // Cutting clips in the selection group is handled in TimelineFunctions
break;
}
} else {
qDebug() << "//// TODO: COMPOSITION CUT!!!";
} }
} else {
qDebug() << "//// TODO: COMPOSITION CUT!!!";
} }
} }
if (!foundClip) { if (!foundClip) {
......
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