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

Fix crash on multiple items deletion

parent 8421430b
...@@ -2508,9 +2508,6 @@ bool TimelineModel::requestGroupDeletion(int clipId, Fun &undo, Fun &redo) ...@@ -2508,9 +2508,6 @@ bool TimelineModel::requestGroupDeletion(int clipId, Fun &undo, Fun &redo)
while (!group_queue.empty()) { while (!group_queue.empty()) {
int current_group = group_queue.front(); int current_group = group_queue.front();
bool isSelection = m_currentSelection == current_group; bool isSelection = m_currentSelection == current_group;
if (isSelection) {
requestClearSelection(true);
}
group_queue.pop(); group_queue.pop();
Q_ASSERT(isGroup(current_group)); Q_ASSERT(isGroup(current_group));
auto children = m_groups->getDirectChildren(current_group); auto children = m_groups->getDirectChildren(current_group);
...@@ -2546,6 +2543,9 @@ bool TimelineModel::requestGroupDeletion(int clipId, Fun &undo, Fun &redo) ...@@ -2546,6 +2543,9 @@ bool TimelineModel::requestGroupDeletion(int clipId, Fun &undo, Fun &redo)
} }
} }
} }
if (isSelection) {
requestClearSelection(true);
}
} }
for (int clip : all_items) { for (int clip : all_items) {
bool res = requestClipDeletion(clip, undo, redo); bool res = requestClipDeletion(clip, undo, redo);
......
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