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

Fix composition cannot be added after deletion / if another composition is...

Fix composition cannot be added after deletion / if another composition is placed just after current pos
Fixes #149
parent 33dc4d06
Pipeline #4639 passed with stage
in 14 minutes and 24 seconds
......@@ -505,7 +505,7 @@ Rectangle {
border.width: 2
border.color: 'green'
opacity: 0
enabled: !clipRoot.isAudio && dragProxy.draggedItem == clipRoot.clipId
enabled: !clipRoot.isAudio && dragProxy.draggedItem === clipRoot.clipId
visible: clipRoot.width > 4 * width
MouseArea {
id: compInArea
......@@ -520,7 +520,6 @@ Rectangle {
}
onPressed: {
timeline.addCompositionToClip('', clipRoot.clipId, 0)
endDrag()
}
onReleased: {
parent.opacity = 0
......@@ -571,7 +570,6 @@ Rectangle {
}
onPressed: {
timeline.addCompositionToClip('', clipRoot.clipId, clipRoot.clipDuration - 1)
endDrag()
}
onReleased: {
parent.opacity = 0
......
......@@ -344,10 +344,7 @@ int TimelineController::insertNewComposition(int tid, int clipId, int offset, co
}
}
position = qMin(minimum + clip_duration - 1, position);
int duration = pCore->currentDoc()->getFramePos(KdenliveSettings::transition_duration());
if (duration == 0) {
duration = m_model->getTrackById_const(tid)->suggestCompositionLength(position);
}
int duration = qMin(pCore->currentDoc()->getFramePos(KdenliveSettings::transition_duration()), m_model->getTrackById_const(tid)->suggestCompositionLength(position));
int lowerVideoTrackId = m_model->getPreviousVideoTrackIndex(tid);
bool revert = offset > clip_duration / 2;
if (lowerVideoTrackId > 0) {
......
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