QmlDesigner: Fix root item size on new project launch

Resizing the window doesn't actually trigger rerendering of the
root item image in single item rendering, so we ensure that happens
by making root item size dirty.

Fixes: QDS-4957
Change-Id: I08750c855458cc309a2683e56557c42dc7c49274
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Miikka Heikkinen
2021-08-31 13:04:25 +03:00
parent 0d4e7599f6
commit b6aaa5dfd2

View File

@@ -154,6 +154,7 @@ void Qt5NodeInstanceServer::resizeCanvasToRootItem()
m_viewData.contentItem->setPosition(-m_viewData.rootItem->position());
#endif
quickWindow()->resize(rootNodeInstance().boundingRect().size().toSize());
DesignerSupport::addDirty(rootNodeInstance().rootQuickItem(), QQuickDesignerSupport::Size);
}
void Qt5NodeInstanceServer::resetAllItems()