forked from qt-creator/qt-creator
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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user