resetCamera() will set needed resolution after resetting camera.
authorMohammed Sameer <msameer@foolab.org>
Sat, 17 Aug 2013 21:09:24 +0000 (00:09 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sat, 17 Aug 2013 21:09:24 +0000 (00:09 +0300)
No need to do that when either ImageSettings or VideoSettings become ready

qml/MainPage.qml

index fb13033..c4f5de4 100644 (file)
@@ -123,6 +123,13 @@ CameraPage {
             return false
         }
 
             return false
         }
 
+        if (mode == Camera.ImageMode) {
+            imageSettings.setImageResolution()
+        }
+        else if (mode == Camera.VideoMode) {
+            videoSettings.setVideoResolution()
+        }
+
         return true
     }
 
         return true
     }
 
@@ -220,12 +227,6 @@ CameraPage {
                 showError(qsTr("Failed to set required resolution"))
             }
         }
                 showError(qsTr("Failed to set required resolution"))
             }
         }
-
-        onReadyChanged: {
-            if (ready) {
-                imageSettings.setImageResolution()
-            }
-        }
     }
 
     VideoSettings {
     }
 
     VideoSettings {
@@ -237,12 +238,6 @@ CameraPage {
                 showError(qsTr("Failed to set required resolution"))
             }
         }
                 showError(qsTr("Failed to set required resolution"))
             }
         }
-
-        onReadyChanged: {
-            if (ready) {
-                videoSettings.setVideoResolution()
-            }
-        }
     }
 
     ModeController {
     }
 
     ModeController {