summaryrefslogtreecommitdiff
path: root/modules/controlcenter
diff options
context:
space:
mode:
Diffstat (limited to 'modules/controlcenter')
-rw-r--r--modules/controlcenter/Panes.qml19
1 files changed, 18 insertions, 1 deletions
diff --git a/modules/controlcenter/Panes.qml b/modules/controlcenter/Panes.qml
index 8c76deb..28124a0 100644
--- a/modules/controlcenter/Panes.qml
+++ b/modules/controlcenter/Panes.qml
@@ -124,6 +124,9 @@ ClippingRectangle {
implicitWidth: root.width
implicitHeight: root.height
+ // Track if this pane has ever been loaded to enable caching
+ property bool hasBeenLoaded: false
+
Loader {
id: loader
@@ -135,12 +138,26 @@ ClippingRectangle {
// Always activate current and adjacent panes immediately for smooth transitions
if (diff <= 1) {
+ pane.hasBeenLoaded = true;
+ return true;
+ }
+
+ // For distant panes that have been loaded before, keep them active to preserve cached data
+ // Only wait for animation if pane hasn't been loaded yet
+ if (pane.hasBeenLoaded) {
return true;
}
- // For distant panes, wait until animation completes to avoid heavy loading during transition
+ // For new distant panes, wait until animation completes to avoid heavy loading during transition
return layout.animationComplete;
}
+
+ onItemChanged: {
+ // Mark pane as loaded when item is created
+ if (item) {
+ pane.hasBeenLoaded = true;
+ }
+ }
}
}
}