From: Mohammed Sameer Date: Wed, 7 Aug 2013 00:35:16 +0000 (+0300) Subject: pop toolbar if we start recording and its depth is greater than 1 X-Git-Url: http://cgit.sxemacs.org/?p=harmattan%2Fcameraplus;a=commitdiff_plain;h=0bcc5e36c09c707add18c70e2a95317d7db8b271 pop toolbar if we start recording and its depth is greater than 1 This prevents scene mode being visible in recording mode --- diff --git a/qml/CameraToolBar.js b/qml/CameraToolBar.js index 36b716b..b57a4a4 100644 --- a/qml/CameraToolBar.js +++ b/qml/CameraToolBar.js @@ -95,6 +95,10 @@ function clear() { } } +function depth() { + return stack.length; +} + function isEmpty() { return stack.length == 0 ? true : false; } diff --git a/qml/CameraToolBar.qml b/qml/CameraToolBar.qml index b53039b..8c4d922 100644 --- a/qml/CameraToolBar.qml +++ b/qml/CameraToolBar.qml @@ -48,6 +48,10 @@ Rectangle { __currentTools = Layout.pop(); } + function depth() { + return Layout.depth() + } + onToolsChanged: { push(tools) } diff --git a/qml/VideoOverlay.qml b/qml/VideoOverlay.qml index 866298a..d1df5bd 100644 --- a/qml/VideoOverlay.qml +++ b/qml/VideoOverlay.qml @@ -258,6 +258,10 @@ Item { } trackerStore.storeVideo(file); + + if (toolBar.depth() > 1) { + toolBar.pop() + } } function startRecording() {