forked from qt-creator/qt-creator
QmlDesigner: Add Loader and Repeater to component library
Also fixes some issues with Repeater usage. Fixes: QDS-5149 Change-Id: I259dcb73be634150dd0c5e602165b63112ec958c Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -1287,8 +1287,15 @@ PixmapChangedCommand NodeInstanceServer::createPixmapChangedCommand(const QList<
|
||||
QVector<ImageContainer> imageVector;
|
||||
|
||||
for (const ServerNodeInstance &instance : instanceList) {
|
||||
if (instance.isValid() && instance.hasContent())
|
||||
imageVector.append(ImageContainer(instance.instanceId(), instance.renderImage(), instance.instanceId()));
|
||||
if (!instance.isValid())
|
||||
continue;
|
||||
|
||||
QImage renderImage;
|
||||
// We need to return empty image if instance has no content to correctly update the
|
||||
// item image in case the instance changed from having content to not having content.
|
||||
if (instance.hasContent())
|
||||
renderImage = instance.renderImage();
|
||||
imageVector.append(ImageContainer(instance.instanceId(), renderImage, instance.instanceId()));
|
||||
}
|
||||
|
||||
return PixmapChangedCommand(imageVector);
|
||||
|
||||
Reference in New Issue
Block a user