From f7f39fdea2755ccebc1b9802caef0ccd18c7fea7 Mon Sep 17 00:00:00 2001 From: Mohammed Sameer Date: Sun, 7 Oct 2012 18:03:34 +0300 Subject: [PATCH] Use replacePage() for the initial page setting to prevent having 2 video pages --- qml/main.qml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/qml/main.qml b/qml/main.qml index a24f4a0..81bc0b8 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -52,11 +52,16 @@ PageStackWindow { Component.onCompleted: { theme.inverted = true; - if (settings.mode == 0) { - openFile("ImagePage.qml"); + if (settings.mode == Camera.VideoMode) { + // TODO: We will use replacePage for now. + // If we use openPage() then we end up with 2 video pages + // stacked on top of each other. + // The first one is created when the camera mode gets + // changed to video upon startup and this becomes the 2nd one. + replacePage("VideoPage.qml"); } else { - openFile("VideoPage.qml"); + replacePage("ImagePage.qml"); } } -- 2.34.1