From 50469e5c82bc0e782c541ca5d8f63d4adb7a2d79 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Thu, 18 Sep 2025 23:33:46 -0400 Subject: [PATCH] BarService: lookupWidget can now match by index. --- Services/BarService.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Services/BarService.qml b/Services/BarService.qml index c88dcdd1..2bfa6cdc 100644 --- a/Services/BarService.qml +++ b/Services/BarService.qml @@ -31,13 +31,18 @@ Singleton { } // Lookup a specific widget instance (returns the actual QML instance) - function lookupWidget(widgetId, screenName = null, section = null) { + function lookupWidget(widgetId, screenName = null, section = null, index = null) { // If looking for a specific instance if (screenName && section !== null) { for (var key in widgetInstances) { var widget = widgetInstances[key] if (widget.widgetId === widgetId && widget.screenName === screenName && widget.section === section) { - return widget.instance + if (index === null) { + return widget.instance + } + else if (widget.index == index) { + return widget.instance + } } } }