]> rtime.felk.cvut.cz Git - coffee/qtwebbrowser.git/commitdiff
Do not die when tab closed
authorMichal Klocek <michal.klocek@theqtcompany.com>
Fri, 6 Nov 2015 19:59:40 +0000 (20:59 +0100)
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>
Mon, 9 Nov 2015 10:56:44 +0000 (10:56 +0000)
Do not show close button if there is only one tab left.

Change-Id: I2c8cea42ca7da3149e2d8041fd8a5029ae0f8f7e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
src/qml/PageView.qml

index b78feaaa95a87f25f51875c3e9f17cd94cf12d94..e82b7592b3765b541fcfd3c733b76a3f7ddbf929 100644 (file)
@@ -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