diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-09-07 16:29:17 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-09-07 14:40:32 +0000 |
commit | 1c70c277deda535a79c4dcad3b2127804743b40f (patch) | |
tree | 2c1b0fedec298596bbc95494790dfebf1e1be622 | |
parent | 19435690e0ddb9cfe652301a4469429033b3ca77 (diff) |
Fix incorrect layer positioning inside subpresentations
When viewport is not set, it cannot be used to calculate the output
size.
Task-number: QT3DS-2292
Change-Id: I6494ecac9da6d8af30991fb5e57402049ef4ea21
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
-rw-r--r-- | src/runtime/q3dsscenemanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/q3dsscenemanager.cpp b/src/runtime/q3dsscenemanager.cpp index e7484b6..bca23ca 100644 --- a/src/runtime/q3dsscenemanager.cpp +++ b/src/runtime/q3dsscenemanager.cpp @@ -504,7 +504,7 @@ void Q3DSSceneManager::updateSizes(const QSize &size, qreal dpr, const QRect &vi qCDebug(lcScene) << "Resize to" << size << "with viewport" << viewport << "device pixel ratio" << dpr; - m_outputPixelSize = viewport.size() * dpr; + m_outputPixelSize = (viewport.isNull() ? size : viewport.size()) * dpr; // m_guiData uses the full surface size (not viewport) m_guiData.outputSize = size; |