summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Qt3DStudio/Palettes
diff options
context:
space:
mode:
authorMahmoud Badri <mahmoud.badri@qt.io>2019-08-21 09:36:33 +0300
committerMahmoud Badri <mahmoud.badri@qt.io>2019-08-21 13:08:52 +0300
commit7f615fa51d166a6c7565e5dde59aa3e325399cf0 (patch)
treee396c1ce1fd47b61ec36ed08d3e536478aa1bec0 /src/Authoring/Qt3DStudio/Palettes
parent540ebc9f075067f56157e9e0eea70113ab52d7e1 (diff)
Hide property graph channel buttons for single channel properties
Task-number: QT3DS-3886 Change-Id: I5d4b9e574ad6940e309952fb90859d1bf0ae9faa Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Qt3DStudio/Palettes')
-rw-r--r--src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTree.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTree.cpp b/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTree.cpp
index 7f000284..79d89c29 100644
--- a/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTree.cpp
+++ b/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTree.cpp
@@ -616,8 +616,11 @@ void RowTree::setPropBinding(ITimelineItemProperty *binding)
{
m_PropBinding = binding;
- m_rectChannels.resize(m_PropBinding->GetChannelCount());
- m_activeChannels.resize(m_PropBinding->GetChannelCount());
+ int chCount = int(m_PropBinding->GetChannelCount());
+ m_activeChannels.resize(chCount);
+ if (chCount == 1) // if property has only 1 channel (ex: alpha), don't show channel buttons
+ chCount = 0;
+ m_rectChannels.resize(chCount);
// For bezier animation select first channel (ie x) only by default, else select all channels
if (m_PropBinding->animationType() == qt3dsdm::EAnimationTypeBezier)