summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-05-07 03:44:36 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-05-07 03:44:36 (GMT)
commit1d1acbdf3161bc5d79ddd73704687f1c604c766a (patch)
treec452310d9c0fcc244efaf1ee2bfe50ba28b16a2e
parent3a6b38c5546df68211e9bd4dceafa6382a18f87a (diff)
downloadQt-1d1acbdf3161bc5d79ddd73704687f1c604c766a.zip
Qt-1d1acbdf3161bc5d79ddd73704687f1c604c766a.tar.gz
Qt-1d1acbdf3161bc5d79ddd73704687f1c604c766a.tar.bz2
Viewing the same image twice showed no image the second time.
-rw-r--r--demos/declarative/flickr/content/ImageDetails.qml1
-rw-r--r--demos/declarative/flickr/flickr.qml8
-rw-r--r--src/declarative/fx/qfximage.cpp11
3 files changed, 17 insertions, 3 deletions
diff --git a/demos/declarative/flickr/content/ImageDetails.qml b/demos/declarative/flickr/content/ImageDetails.qml
index 45e191a..8ed61ec 100644
--- a/demos/declarative/flickr/content/ImageDetails.qml
+++ b/demos/declarative/flickr/content/ImageDetails.qml
@@ -3,7 +3,6 @@ Flipable {
property var frontContainer: ContainerFront
property var flickableArea: Flickable
- property var fullScreenArea: BigImage
property string photoTitle: ""
property string photoDescription: ""
property int photoWidth
diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml
index 5caffb9..95c808c 100644
--- a/demos/declarative/flickr/flickr.qml
+++ b/demos/declarative/flickr/flickr.qml
@@ -35,14 +35,18 @@ Item {
Connection {
sender: ImageDetails; signal: "closed()"
- script: { if (Wrapper.state == 'Details') Wrapper.state = '' }
+ script: {
+ if (Wrapper.state == 'Details') {
+ Wrapper.state = '';
+ ImageDetails.photoUrl = "";
+ }
+ }
}
Script {
function photoClicked() {
ImageDetails.photoTitle = title;
ImageDetails.flickableArea.yPosition = 0;
- ImageDetails.fullScreenArea.source = "";
ImageDetails.photoDescription = description;
ImageDetails.photoWidth = photoWidth;
ImageDetails.photoHeight = photoHeight;
diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp
index 835a4ff..657e9a5 100644
--- a/src/declarative/fx/qfximage.cpp
+++ b/src/declarative/fx/qfximage.cpp
@@ -880,6 +880,17 @@ void QFxImage::setSource(const QString &url)
if (url.isEmpty()) {
setPixmap(QPixmap());
d->status = Idle;
+ d->progress = 1.0;
+ setImplicitWidth(0);
+ setImplicitHeight(0);
+#if defined(QFX_RENDER_OPENGL)
+ d->_texDirty = true;
+ d->_tex.clear();
+#endif
+ emit statusChanged(d->status);
+ emit sourceChanged(d->source);
+ emit progressChanged(1.0);
+ update();
} else {
d->status = Loading;
if (d->url.path().endsWith(QLatin1String(".sci"))) {