kde/gui: fix binding loop and Column anchor errors

- Remove chatPane property from delegate (was shadowing id, causing binding loop)
- Remove contentArea MouseArea from inside Column (invalid anchor)
- Simplify hovered property to use only headerArea
- Edit button now copies to clipboard instead of trying to access chatPane
This commit is contained in:
Levi Neely 2026-09-04 14:20:40 +02:00
parent 75a2da080e
commit eb12627ea0
2 changed files with 4 additions and 15 deletions

View File

@ -33,7 +33,7 @@ Column {
}
// Show action buttons on hover
property bool hovered: headerArea.containsMouse || contentArea.containsMouse
property bool hovered: headerArea.containsMouse
// Header color based on block type and theme
function headerColor() {
@ -171,12 +171,11 @@ Column {
implicitHeight: 22
visible: blockType === "user"
ToolTip.visible: hovered
ToolTip.text: "Edit & Resend"
ToolTip.text: "Copy to input for editing"
onClicked: {
var content = getBlockPlainText()
// Find the prompt input and set its text
// This requires the parent ChatPane to expose the input
chatPane.setPromptText(content)
// Copy to clipboard - user can paste into input
if (content) clipboard.copyText(content)
}
}
}
@ -190,14 +189,6 @@ Column {
visible: root.blockExpanded
spacing: 4
MouseArea {
id: contentArea
anchors.fill: parent
hoverEnabled: true
propagateComposedEvents: true
acceptedButtons: Qt.NoButton
}
// Fast path: single TextEdit for the concatenated HTML.
// Diagrams are handled separately via the segments list.
TextEdit {

View File

@ -150,8 +150,6 @@ Item {
delegate: ChatBlockDelegate {
width: chatView.width - 8
// Pass reference to chatPane for Edit & Resend
property var chatPane: chatPane
}
}