Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Fix recent regression - crash on ungroup

parent 76f72bdf
......@@ -540,13 +540,22 @@ void TimelineController::unGroupSelection(int cid)
pCore->displayMessage(i18n("Select at least 1 item to ungroup"), InformationMessage, 500);
return;
}
if (cid == -1 && m_model->m_temporarySelectionGroup >= 0) {
cid = m_model->m_temporarySelectionGroup;
}
if (m_model->m_groups->isInGroup(cid)) {
cid = m_model->m_groups->getRootId(cid);
if (cid == -1) {
if (m_model->m_temporarySelectionGroup >= 0) {
cid = m_model->m_temporarySelectionGroup;
} else {
for (int id : m_selection.selectedItems) {
if (m_model->m_groups->getRootId(id)) {
cid = id;
break;
}
}
}
}
if (cid > -1) {
if (m_model->m_groups->isInGroup(cid)) {
cid = m_model->m_groups->getRootId(cid);
}
m_model->requestClipUngroup(cid);
}
if (m_model->m_temporarySelectionGroup >= 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