From 73cbf360e599a184d85ea220b13ffc70b308d4e7 Mon Sep 17 00:00:00 2001 From: dodoradio Date: Mon, 10 Jul 2023 16:17:44 +0100 Subject: Make the app remember the last used sensor. We just store the current item of the main PathView as a setting. --- src/main.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.qml b/src/main.qml index 2457d8c..31ce17e 100644 --- a/src/main.qml +++ b/src/main.qml @@ -22,6 +22,7 @@ import QtQuick 2.5 import org.asteroid.controls 1.0 import QtGraphicalEffects 1.15 import QtQml.Models 2.15 +import Nemo.Configuration 1.0 Application { id: app @@ -43,6 +44,8 @@ Application { highlightRangeMode: PathView.StrictlyEnforceRange highlightMoveDuration: 0 clip: true + currentIndex: currentPaneStore.value + onCurrentIndexChanged: currentPaneStore.value = currentIndex model: ObjectModel { id: contentColumn Compass { @@ -67,6 +70,11 @@ Application { PathLine { x: pv.width/2; y: pv.height/2+pv.count*pv.height/2 } } } + ConfigurationValue { + id: currentPaneStore + key: "/org/asteroidos/toolwatch/mainPage/currentPane" + defaultValue: true + } PageHeader { text: pv.currentItem.name -- cgit v1.2.3-54-g00ecf