summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2019-03-26 13:21:30 +0200
committerTomi Korpipää <tomi.korpipaa@qt.io>2019-03-26 11:43:41 +0000
commit671c2d3dd9b31cc3e62346857f5c22709a5c2fba (patch)
tree634539b97352357ad214541077616e312be4cdb6 /src/Authoring/Studio/Palettes/TimelineGraphicsView/ui
parent6297443c8cdba4cd82d1f74ef89ab99aaf78a98f (diff)
Fix master slide item grouping issuesv2.3.0-rc2
Disallow grouping mixed non-master and master items. If master items are grouped, the resulting group is a master group. Disallow dragging master items under non-master items in some edge cases that still allowed it. Change-Id: Id4e18405526fb5b0f9ed17bc29e758101a19875e Fixes: QT3DS-3224 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/TimelineGraphicsView/ui')
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp8
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp
index c4a2392f..8445278c 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp
@@ -1138,6 +1138,14 @@ bool RowTree::isComponent() const
return m_rowType == OBJTYPE_COMPONENT;
}
+bool RowTree::isComponentRoot() const
+{
+ if (m_rowType == OBJTYPE_COMPONENT && m_binding)
+ return static_cast<Qt3DSDMTimelineItemBinding *>(m_binding)->isRootComponent();
+
+ return false;
+}
+
bool RowTree::isMaster() const
{
return m_master;
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.h b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.h
index 249a3271..f6c54b56 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.h
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.h
@@ -112,6 +112,7 @@ public:
bool isProperty() const;
bool isPropertyOrMaterial() const;
bool isComponent() const;
+ bool isComponentRoot() const;
bool isMaster() const;
bool hasPropertyChildren() const;
bool empty() const; // has zero child rows (and zero properties)