Merge branch 'settings' into harmattan
[chessclock] / qml / NewGameDialogPage.qml
index e56ff58..f3ba827 100644 (file)
@@ -202,9 +202,9 @@ Page
                 anchors.top: whiteSmall.bottom
                 anchors.left: whiteTurnsPerAddition.left
 
-                property int hours
-                property int minutes
-                property int seconds
+                property int hours: 0
+                property int minutes: 30
+                property int seconds: 0
 
                 text: {hours + " h " + minutes + " min " + seconds + " s"}
 
@@ -236,9 +236,9 @@ Page
                 anchors.top: whiteSmall.bottom
                 anchors.left:  blackTurnsPerAddition.left
 
-                property int hours
-                property int minutes
-                property int seconds
+                property int hours: 0
+                property int minutes: 30
+                property int seconds: 0
 
                 text: hours + " h " + minutes + " min " + seconds + " s"
 
@@ -286,9 +286,9 @@ Page
                 anchors.topMargin: 15
   //              anchors.left: additionalTimeText.right
                 anchors.left: whiteTurnsPerAddition.left
-                property int hours
-                property int minutes
-                property int seconds
+                property int hours: 0
+                property int minutes: 0
+                property int seconds: 30
 
                 text: hours + " h " + minutes + " min " + seconds + " s"
 
@@ -317,9 +317,9 @@ Page
                 anchors.top: whiteAdditionalTime.top
                 anchors.left: blackTurnsPerAddition.left
 
-                property int hours
-                property int minutes
-                property int seconds
+                property int hours: 0
+                property int minutes: 0
+                property int seconds: 30
 
                 text: hours + " h " + minutes + " min " + seconds + " s"
 
@@ -367,8 +367,10 @@ Page
                     onClicked:
                     {
                         turnsDialog.player = "white"
-                        turnsColumn.selectedIndex = parent.text-1
                         turnsDialog.open()
+                        turnsColumn.selectedIndex = parent.text-1 //Needs to be after open(),  or gets overridden by the previous chosen value
+
+
                     }
                 }
 
@@ -390,8 +392,8 @@ Page
                     onClicked:
                     {
                         turnsDialog.player = "black"
-                        turnsColumn.selectedIndex = parent.text-1
                         turnsDialog.open()
+                        turnsColumn.selectedIndex = parent.text-1 //Needs to be after open(),  or gets overridden by the previous chosen value
                     }
                 }
 
@@ -509,7 +511,6 @@ TimePickerDialog
 TumblerColumn
 {
     id: turnsColumn
-    selectedIndex: 1
     items: turnsList