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

Fix crash when changing composition type of a grouped composition

parent 4a22be2c
......@@ -3563,6 +3563,13 @@ void TimelineModel::switchComposition(int cid, const QString &compoId)
int forcedTrack = compo->getForcedTrack();
Fun undo = []() { return true; };
Fun redo = []() { return true; };
// Clear selection
if (m_groups->isInGroup(cid)) {
pCore->displayMessage(i18n("Cannot operate on grouped composition, please ungroup"), ErrorMessage);
bool res = requestCompositionDeletion(cid, undo, redo);
int newId;
res = res && requestCompositionInsertion(compoId, currentTrack, a_track, currentPos, duration, nullptr, newId, undo, redo);
Supports Markdown
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