forked from qt-creator/qt-creator
QmlDesigner: Crash fix
Editing subcomponents should only be possible for graphical items. Qt Creator was crashing in case the node was something else. Change-Id: Ia0e286c666b0b485da0817678ca2048ace260c9b Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
d8eb2bf762
commit
48537ca197
@@ -25,6 +25,9 @@
|
||||
|
||||
#include "componentview.h"
|
||||
#include "componentaction.h"
|
||||
|
||||
#include <nodemetainfo.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include <nodeabstractproperty.h>
|
||||
@@ -193,7 +196,9 @@ void ComponentView::searchForComponentAndAddToList(const ModelNode &node)
|
||||
foreach (const ModelNode &node, node.allSubModelNodesAndThisNode()) {
|
||||
if (node.nodeSourceType() == ModelNode::NodeWithComponentSource
|
||||
|| (node.hasParentProperty()
|
||||
&& !node.parentProperty().isDefaultProperty())) {
|
||||
&& !node.parentProperty().isDefaultProperty()
|
||||
&& node.metaInfo().isValid()
|
||||
&& node.metaInfo().isGraphicalItem())) {
|
||||
if (masterNotAdded) {
|
||||
masterNotAdded = true;
|
||||
addMasterDocument();
|
||||
|
Reference in New Issue
Block a user