aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/items/qquickborderimage.cpp3
-rw-r--r--src/declarative/items/qquickimage.cpp5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/declarative/items/qquickborderimage.cpp b/src/declarative/items/qquickborderimage.cpp
index fac7543fce..5f30c40626 100644
--- a/src/declarative/items/qquickborderimage.cpp
+++ b/src/declarative/items/qquickborderimage.cpp
@@ -592,6 +592,9 @@ void QQuickBorderImage::pixmapChange()
Q_D(QQuickBorderImage);
d->pixmapChanged = true;
+
+ // When the pixmap changes, such as being deleted, we need to update the textures
+ update();
}
QT_END_NAMESPACE
diff --git a/src/declarative/items/qquickimage.cpp b/src/declarative/items/qquickimage.cpp
index 6d2e1b3187..2f924fa313 100644
--- a/src/declarative/items/qquickimage.cpp
+++ b/src/declarative/items/qquickimage.cpp
@@ -703,9 +703,8 @@ void QQuickImage::pixmapChange()
updatePaintedGeometry();
d->pixmapChanged = true;
- // Make sure we update the texture provider when the image has changed.
- if (d->provider)
- update();
+ // When the pixmap changes, such as being deleted, we need to update the textures
+ update();
}
QQuickImage::VAlignment QQuickImage::verticalAlignment() const