aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordodoradio <dodoradio@outlook.com>2023-07-10 16:17:44 +0100
committerdodoradio <dodoradio@outlook.com>2023-07-10 22:37:58 +0100
commit73cbf360e599a184d85ea220b13ffc70b308d4e7 (patch)
tree1df89c22e9f4494bca3aad3fea31e1fda9f6ee53 /src
parent3be8d094df5a8280c95d4df51dd20e3b22c9db1c (diff)
Make the app remember the last used sensor.
We just store the current item of the main PathView as a setting.
Diffstat (limited to '')
-rw-r--r--src/main.qml8
1 files changed, 8 insertions, 0 deletions
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