From 8507df1bcf3aeca35a56c6ec82682e89ce996762 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Mon, 16 Aug 2021 17:36:05 +0200 Subject: [PATCH] Changed the showPage() function. This is because the normal function would take you to the next index, but if you would want to skip a index, you need to change the index to a fixed number (or redo the whole index-tab-system) --- qml/App.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qml/App.qml b/qml/App.qml index ede998f..d70fde9 100644 --- a/qml/App.qml +++ b/qml/App.qml @@ -23,11 +23,13 @@ Item { __currentIndex = lastPages.length-1; } - function showPage(name) + function showPage(name, index = -1) { lastPages.push(name) pageLoader.setSource(name) - __currentIndex = lastPages.length-1; + if(index === -1) + __currentIndex = lastPages.length-1 + else __currentIndex = index } TitleBar {