Don't try to change the resolution or aspect ratio if camera is busy
authorMohammed Sameer <msameer@foolab.org>
Sat, 22 Sep 2012 21:04:48 +0000 (00:04 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sat, 22 Sep 2012 21:04:48 +0000 (00:04 +0300)
qml/ImageSettingsPage.qml

index 31f782a..c4ceaa3 100644 (file)
@@ -161,6 +161,11 @@ CameraPage {
                                                 text: qsTr(modelData);
                                                 checked: settings.imageAspectRatio == modelData;
                                                 onClicked: {
+                                                        if (!cam.idle) {
+                                                                showError(qsTr("Camera is busy saving."));
+                                                                return;
+                                                        }
+
                                                         settings.imageAspectRatio = modelData;
                                                         imageSettings.resolutions.aspectRatio = modelData;
                                                 }
@@ -191,7 +196,14 @@ CameraPage {
                                                 property string aspectRatio: resolutionAspectRatio
                                                 text: resolutions.name(resolutionName, megaPixels);
                                                 checked: settings.imageResolution == resolutionName
-                                                onClicked: settings.imageResolution = resolutionName;
+                                                onClicked: {
+                                                        if (!cam.idle) {
+                                                                showError(qsTr("Camera is busy saving."));
+                                                                return;
+                                                        }
+
+                                                        settings.imageResolution = resolutionName;
+                                                }
                                         }
                                 }
                         }