diff options
Diffstat (limited to 'src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp')
-rw-r--r-- | src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp index 3e35a361..437d81dc 100644 --- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp +++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp @@ -310,15 +310,20 @@ void RowMover::updateTargetRow(const QPointF &scenePos, EStudioObjectType rowTyp bool srcHasMaster = sourceRowsHasMaster(); if (!rowInsert1->locked() && rowInsert1->isContainer() && !m_sourceRows.contains(rowInsert1) // prevent insertion a master row under a non-master unless under a component root - && (!(srcHasMaster && !rowInsert1->isMaster()) || rowInsert1->isComponent())) { + && (!(srcHasMaster && !rowInsert1->isMaster()) || rowInsert1->isComponentRoot())) { depthMax++; // Container: allow insertion as a child - } else if (rowInsert1->isPropertyOrMaterial() && !rowInsert1->parentRow()->isContainer()) { - depthMax--; // non-container with properties and/or a material - } else if (srcHasMaster) { + } else { RowTree *row = rowInsert1->parentRow(); - while (row && !row->isMaster() && !row->isComponent()) { - depthMax--; - row = row->parentRow(); + if (rowInsert1->isPropertyOrMaterial() && !rowInsert1->parentRow()->isContainer()) { + depthMax--; // non-container with properties and/or a material + if (row) + row = row->parentRow(); + } + if (srcHasMaster) { + while (row && !row->isMaster() && !row->isComponent()) { + depthMax--; + row = row->parentRow(); + } } } |