diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-08-16 11:30:17 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-08-16 12:43:43 +0000 |
commit | 573cc93fcc136777e69b3ac38dbaaff64a513d76 (patch) | |
tree | eb63c1ed4c827c2274ba8730ab4c806ceaf13743 /src/imports/studio3d/q3dsstudio3ditem.cpp | |
parent | 3fecbb05249957deb90f663e8040ac163b814478 (diff) |
Disable input handling on Studio3D when View3Ds are present
because in this case the View3D items should process input.
Change-Id: Ia23e71c77e5049b841c2a408cc37ac73f4257f37
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src/imports/studio3d/q3dsstudio3ditem.cpp')
-rw-r--r-- | src/imports/studio3d/q3dsstudio3ditem.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/imports/studio3d/q3dsstudio3ditem.cpp b/src/imports/studio3d/q3dsstudio3ditem.cpp index 2354ade..0331266 100644 --- a/src/imports/studio3d/q3dsstudio3ditem.cpp +++ b/src/imports/studio3d/q3dsstudio3ditem.cpp @@ -239,7 +239,14 @@ void Q3DSStudio3DItem::setupSeparateViews() if (m_engine && window()) { m_separateViewSetupPending = false; - m_engine->setMainLayerComposition(m_views.isEmpty()); + const bool hasSeparateViews = !m_views.isEmpty(); + + // turn off (or re-enable) layer composition via the 3D engine + m_engine->setMainLayerComposition(!hasSeparateViews); + + // use the silly but convenient legacy API to disable input processing + // in case it is taken over by the View3D items + setIgnoredEvents(hasSeparateViews ? IgnoreAllInputEvents : EnableAllEvents); const qreal dpr = window()->effectiveDevicePixelRatio(); for (Q3DSStudio3DView *view : m_views) { |