Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
6d71034c
Commit
6d71034c
authored
Feb 05, 2017
by
Jean-Baptiste Mardelle
Browse files
Fix crash on razor with multiple clips selected
BUG: 376082
parent
885fb4d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/timeline/customtrackview.cpp
View file @
6d71034c
...
...
@@ -4315,6 +4315,8 @@ void CustomTrackView::cutSelectedClips(QList<QGraphicsItem *> itemList, GenTime
if (under)
itemList << under;
}
QUndoCommand *command = new QUndoCommand;
command->setText(i18n("Razor clip"));
for (int i = 0; i < itemList.count(); ++i) {
if (!itemList.at(i))
continue;
...
...
@@ -4325,8 +4327,7 @@ void CustomTrackView::cutSelectedClips(QList<QGraphicsItem *> itemList, GenTime
if (!groups.contains(group))
groups << group;
} else if (currentPos > item->startPos() && currentPos < item->endPos()) {
RazorClipCommand *command = new RazorClipCommand(this, item->info(), item->effectList(), currentPos);
m_commandStack->push(command);
new RazorClipCommand(this, item->info(), item->effectList(), currentPos, true, command);
}
} else if (itemList.at(i)->type() == GroupWidget && itemList.at(i) != m_selectionGroup) {
AbstractGroupItem *group = static_cast<AbstractGroupItem *>(itemList.at(i));
...
...
@@ -4334,6 +4335,11 @@ void CustomTrackView::cutSelectedClips(QList<QGraphicsItem *> itemList, GenTime
groups << group;
}
}
if (command->childCount() > 0) {
m_commandStack->push(command);
} else {
delete command;
}
for (int i = 0; i < groups.count(); ++i)
razorGroup(groups.at(i), currentPos);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment