QmlDesigner: Use boundingRect() instead of contentItemBoundingRect

The contentItemBoundingRect is typically null, unless there is a content
item.

Change-Id: Ic32deac3c2506ff05feb28399b1ccaedacb5f68f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Thomas Hartmann
2021-01-26 11:32:38 +01:00
parent 59eff8c813
commit d6e50e77cc

View File

@@ -62,7 +62,7 @@ CapturedDataCommand::StateData collectStateData(ServerNodeInstance rootNodeInsta
CapturedDataCommand::NodeData nodeData; CapturedDataCommand::NodeData nodeData;
nodeData.nodeId = instance.instanceId(); nodeData.nodeId = instance.instanceId();
nodeData.contentRect = instance.contentItemBoundingRect(); nodeData.contentRect = instance.boundingRect();
nodeData.sceneTransform = instance.sceneTransform(); nodeData.sceneTransform = instance.sceneTransform();
auto textProperty = instance.property("text"); auto textProperty = instance.property("text");
if (!textProperty.isNull() && instance.holdsGraphical()) if (!textProperty.isNull() && instance.holdsGraphical())