summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2015-11-06 20:59:40 +0100
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-11-09 10:56:44 +0000
commit8a1e95239518d3c4344122f66ad66a49d455e4dc (patch)
tree0f219b267820b3f8bf0f8bc8b0791c86b9267bde
parent5f36d47460d6021400244c428b9de332e5e8983a (diff)
Do not die when tab closed
Do not show close button if there is only one tab left. Change-Id: I2c8cea42ca7da3149e2d8041fd8a5029ae0f8f7e Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r--src/qml/PageView.qml4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/qml/PageView.qml b/src/qml/PageView.qml
index b78feaa..e82b759 100644
--- a/src/qml/PageView.qml
+++ b/src/qml/PageView.qml
@@ -419,8 +419,6 @@ Rectangle {
listModel.remove(index)
pathView.decrementCurrentIndex()
pathView.interactive = true
- if (listModel.count == 0)
- engine.rootWindow.close()
}
function get(index) {
@@ -558,7 +556,7 @@ Rectangle {
Rectangle {
enabled: index == pathView.currentIndex && !pathView.moving && !pathView.flicking && wrapper.visibility == 1.0
opacity: enabled ? 1.0 : 0.0
- visible: wrapper.visibility == 1.0
+ visible: wrapper.visibility == 1.0 && listModel.count > 1
width: image.sourceSize.width
height: image.sourceSize.height - 2
radius: width / 2