diff options
| author | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-11-16 14:15:53 +0100 |
|---|---|---|
| committer | Tim Jenssen <tim.jenssen@qt.io> | 2022-11-16 17:51:28 +0000 |
| commit | 2a44f8caafbe8d7ed85c136616f9e82ce0973893 (patch) | |
| tree | f53a58f5b63eb0d65f04412a32a73d2ec2870713 /src/tools/qml2puppet | |
| parent | f6cfe31c7f834bc6769be7d4928d30b7188002e8 (diff) | |
| download | qt-creator-2a44f8caafbe8d7ed85c136616f9e82ce0973893.tar.gz | |
QmlDesigner: Fix shaking items when scrubbing the timeline
The reason for this is that when scrubbing the timeline,
the bounding rectangle can change a lot (See bugreport).
If this is the case the pixmap and the bounding rectangle get temporarily
out of sync, which leads to the shaking.
In this patch we add the bounding rectangle to the pixmap command.
The bounding rectangle coming with the pixmap has higher precedence.
This means if there is a pixmap, then the pixmap is always in sync with
the pixmap. If there is no pixmap we use the "original" bounding rectangle.
Task-number: QDS-7828
Change-Id: I40c0b7ed97863b9dca726547927ae1a37f9c415d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/tools/qml2puppet')
| -rw-r--r-- | src/tools/qml2puppet/qml2puppet/instances/nodeinstanceserver.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/qml2puppet/qml2puppet/instances/nodeinstanceserver.cpp b/src/tools/qml2puppet/qml2puppet/instances/nodeinstanceserver.cpp index 9fe970f8c7..d3209e4ccb 100644 --- a/src/tools/qml2puppet/qml2puppet/instances/nodeinstanceserver.cpp +++ b/src/tools/qml2puppet/qml2puppet/instances/nodeinstanceserver.cpp @@ -1316,7 +1316,9 @@ PixmapChangedCommand NodeInstanceServer::createPixmapChangedCommand(const QList< // 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())); + auto container = ImageContainer(instance.instanceId(), renderImage, instance.instanceId()); + container.setRect(instance.boundingRect()); + imageVector.append(container); } return PixmapChangedCommand(imageVector); |
