From 42aeaebb4eda1475fede966803c2f7c2573dd41f Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 28 Nov 2011 17:25:26 +0100 Subject: [PATCH] fix loading of toolbar of initialPage --- .../plasmacomponents/qml/PageStack.qml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/declarativeimports/plasmacomponents/qml/PageStack.qml b/declarativeimports/plasmacomponents/qml/PageStack.qml index e604c5302..cced8a908 100644 --- a/declarativeimports/plasmacomponents/qml/PageStack.qml +++ b/declarativeimports/plasmacomponents/qml/PageStack.qml @@ -121,17 +121,23 @@ Item { } onInitialPageChanged: { + if (!internal.completed) { + return + } + if (initialPage) { - if (depth == 0) + if (depth == 0) { push(initialPage, null, true) - else if (depth == 1) + } else if (depth == 1) { replace(initialPage, null, true) - else + } else { console.log("Cannot update PageStack.initialPage") + } } } Component.onCompleted: { + internal.completed = true if (initialPage && depth == 0) push(initialPage, null, true) } @@ -142,6 +148,9 @@ Item { // The number of ongoing transitions. property int ongoingTransitionCount: 0 + //FIXME: there should be a way to access to theh without storing it in an ugly way + property bool completed: false + // Sets the page status. function setPageStatus(page, status) {