summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2019-09-24 08:47:37 +0300
committerTomi Korpipaa <tomi.korpipaa@qt.io>2019-09-24 10:48:21 +0300
commit322e72f1defcea00110d2697e334d358cdb53027 (patch)
treebe96dfdf0ff52e6a4ef1cd119b1d40b59faad8c1 /src
parent5761302f543d2335a59559fbedb49e94ce42fac2 (diff)
Disable change time bar color for active component
This disables setting the time bar color from menu when a component is opened and selected. Task-number: QT3DS-3956 Change-Id: Ibfd48d9640c3a5f3a07097c11379d24bf8426275 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/Authoring/Qt3DStudio/Application/StudioApp.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/Authoring/Qt3DStudio/Application/StudioApp.cpp b/src/Authoring/Qt3DStudio/Application/StudioApp.cpp
index 5ca21921..2dc51e26 100644
--- a/src/Authoring/Qt3DStudio/Application/StudioApp.cpp
+++ b/src/Authoring/Qt3DStudio/Application/StudioApp.cpp
@@ -1108,15 +1108,10 @@ QString CStudioApp::GetPasteType()
bool CStudioApp::CanChangeTimebarColor()
{
- bool theRetVal = true;
- qt3dsdm::Qt3DSDMInstanceHandle theSelectedInstance = m_core->GetDoc()->GetSelectedInstance();
- if (!theSelectedInstance.Valid()
- || m_core->GetDoc()->GetStudioSystem()->GetClientDataModelBridge()->IsSceneInstance(
- theSelectedInstance)) {
- theRetVal = false;
- }
+ auto theSelectedInstance = m_core->GetDoc()->GetSelectedInstance();
+ auto bridge = m_core->GetDoc()->GetStudioSystem()->GetClientDataModelBridge();
- return theRetVal;
+ return theSelectedInstance.Valid() && !bridge->IsActiveComponent(theSelectedInstance);
}
/**