From 073cc2158bb6122a4828de537e4bec71a5db196b Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Fri, 7 Aug 2026 17:49:26 +0200 Subject: [PATCH] qml: fix binding loop in ChatBlockDelegate Rename 'chatView' property to 'parentListView' to avoid name collision with the ListView id, which caused QML binding loop warnings. --- gui/ChatBlockDelegate.qml | 16 ++++++++-------- gui/main.qml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gui/ChatBlockDelegate.qml b/gui/ChatBlockDelegate.qml index bee6f2e..f7daf84 100644 --- a/gui/ChatBlockDelegate.qml +++ b/gui/ChatBlockDelegate.qml @@ -13,7 +13,7 @@ ColumnLayout { required property var blockSegments // Reference to parent ListView for scroll control - property var chatView: null + property ListView parentListView: null // Expand state based on block type property bool blockExpanded: { @@ -150,9 +150,9 @@ ColumnLayout { selectedTextColor: theme.highlightedTextColor onActiveFocusChanged: { - if (!activeFocus && root.chatView) - root.chatView.interactive = true - } + if (!activeFocus && root.parentListView) + root.parentListView.interactive = true + } Menu { id: contextMenu @@ -173,11 +173,11 @@ ColumnLayout { propagateComposedEvents: true cursorShape: Qt.IBeamCursor onPressed: function(mouse) { - if (root.chatView) root.chatView.interactive = false + if (root.parentListView) root.parentListView.interactive = false mouse.accepted = false } onReleased: function(mouse) { - if (root.chatView) root.chatView.interactive = true + if (root.parentListView) root.parentListView.interactive = true mouse.accepted = false } } @@ -279,11 +279,11 @@ ColumnLayout { propagateComposedEvents: true cursorShape: Qt.IBeamCursor onPressed: function(mouse) { - if (root.chatView) root.chatView.interactive = false + if (root.parentListView) root.parentListView.interactive = false mouse.accepted = false } onReleased: function(mouse) { - if (root.chatView) root.chatView.interactive = true + if (root.parentListView) root.parentListView.interactive = true mouse.accepted = false } } diff --git a/gui/main.qml b/gui/main.qml index 6e275c9..3de2677 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -929,7 +929,7 @@ ApplicationWindow { delegate: ChatBlockDelegate { width: chatView.width - 8 - chatView: chatView + parentListView: chatView } }