Give aspect ratios Repeater an id (aspectRatios)
[harmattan/cameraplus] / qml / ImageResolutionSettings.qml
index 514115d..3f8b5c0 100644 (file)
@@ -30,6 +30,7 @@ Column {
 
     SectionHeader {
         text: qsTr("Aspect ratio")
+        visible: aspectRatioRow.visible
     }
 
     CameraButtonRow {
@@ -37,8 +38,10 @@ Column {
         width: parent.width
         enabled: camera ? camera.idle : false
         exclusive: false
+        visible: imageSettings.aspectRatioCount > 1
 
         Repeater {
+            id: aspectRatios
             model: imageSettings.aspectRatios
             delegate: CameraButton {
                 text: qsTr(modelData)
@@ -50,6 +53,7 @@ Column {
 
     SectionHeader {
         text: qsTr("Resolution")
+        visible: resolutionsRow.visible
     }
 
     CameraButtonRow {
@@ -57,6 +61,7 @@ Column {
         width: parent.width
         enabled: camera ? camera.idle : false
         exclusive: false
+        visible: imageSettings.resolutions.count > 1
 
         Binding {
             target: imageSettings.resolutions