QmlDesigner: Set size of root item when showing the widget

Change-Id: I6cdbed1015bdb32a8e91919563624a7a0a829a9a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2021-05-27 13:24:05 +02:00
parent a045d3ecc6
commit 4a1e195978

View File

@@ -576,6 +576,9 @@ void FormEditorWidget::showEvent(QShowEvent *event)
m_formEditorView->cleanupToolsAndScene();
m_formEditorView->setupFormEditorWidget();
m_formEditorView->resetToSelectionTool();
QmlItemNode rootNode = m_formEditorView->rootModelNode();
if (rootNode.isValid())
setRootItemRect(rootNode.instanceBoundingRect());
}
}