diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2020-09-24 16:20:34 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2020-09-29 09:58:21 +0000 |
commit | 8d6ee2509d60eb5ebc078da538c825cc7ef4c1f0 (patch) | |
tree | 7deabd67a0d84923b7169611b2be8ec485a7100c /src/plugins/qmldesigner/components/componentcore | |
parent | 36a8b8ad99e3cb7ac5b577617016824b40d37799 (diff) |
QmlDesigner: Show tooltip preview image for Textures with sourceItem
For non-component sourceItems, the preview shown is simply whatever
image has been stored for form editor for that item.
If the sourceItem is component, the preview image is the same as
sourceItem's preview image, as the form editor image for components
often includes unnecessary empty space.
Note that currently the image stored for form editor doesn't include
child items, so this is not a perfect solution. It is however in line
with what form editor shows for the texture.
Change-Id: I3c0c629ca5e7fa25dbcb390c53e3865e34d5e729
Fixes: QDS-2824
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner/components/componentcore')
-rw-r--r-- | src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp index e77fcb3356..f76542d378 100644 --- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp +++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp @@ -1522,7 +1522,7 @@ void removeGroup(const SelectionContext &selectionContext) QVariant previewImageDataForGenericNode(const ModelNode &modelNode) { if (modelNode.isValid()) - return modelNode.model()->nodeInstanceView()->previewImageDataForGenericNode(modelNode); + return modelNode.model()->nodeInstanceView()->previewImageDataForGenericNode(modelNode, {}); return {}; } |