forked from qt-creator/qt-creator
QmlDesigner: Keep Qt 3D scenes from crashing
If we do not set the source property of the Q3DSPresentationItem nothing is actually rendered. If a scene is rendered in the puppet we get an invalid OpenGL context when rendering in the qml2puppet. Change-Id: I74db0df7de759e830499967bc6985745be291856 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "positionernodeinstance.h"
|
||||
#include "layoutnodeinstance.h"
|
||||
#include "debugoutputcommand.h"
|
||||
#include "qt3presentationdnodeinstance.h"
|
||||
|
||||
#include "quickitemnodeinstance.h"
|
||||
|
||||
@@ -161,6 +162,8 @@ Internal::ObjectNodeInstance::Pointer ServerNodeInstance::createInstance(QObject
|
||||
|
||||
if (objectToBeWrapped == 0)
|
||||
instance = Internal::DummyNodeInstance::create();
|
||||
else if (isSubclassOf(objectToBeWrapped, "Q3DSPresentationItem"))
|
||||
instance = Internal::Qt3DPresentationNodeInstance::create(objectToBeWrapped);
|
||||
else if (isSubclassOf(objectToBeWrapped, "QQuickBasePositioner"))
|
||||
instance = Internal::PositionerNodeInstance::create(objectToBeWrapped);
|
||||
else if (isSubclassOf(objectToBeWrapped, "QQuickLayout"))
|
||||
|
||||
Reference in New Issue
Block a user