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,6 +1045,7 @@ void TimelineController::cutClipUnderCursor(int position, int track) ...@@ -1045,6 +1045,7 @@ 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();
if (track == -1) {
for (int cid : selection) { for (int cid : selection) {
if (m_model->isClip(cid)) { if (m_model->isClip(cid)) {
if (TimelineFunctions::requestClipCut(m_model, cid, position)) { if (TimelineFunctions::requestClipCut(m_model, cid, position)) {
...@@ -1056,6 +1057,7 @@ void TimelineController::cutClipUnderCursor(int position, int track) ...@@ -1056,6 +1057,7 @@ void TimelineController::cutClipUnderCursor(int position, int track)
qDebug() << "//// TODO: COMPOSITION CUT!!!"; qDebug() << "//// TODO: COMPOSITION CUT!!!";
} }
} }
}
if (!foundClip) { if (!foundClip) {
if (track == -1) { if (track == -1) {
track = m_activeTrack; track = m_activeTrack;
......
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