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:
parent
75a2da080e
commit
eb12627ea0
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -150,8 +150,6 @@ Item {
|
|||
|
||||
delegate: ChatBlockDelegate {
|
||||
width: chatView.width - 8
|
||||
// Pass reference to chatPane for Edit & Resend
|
||||
property var chatPane: chatPane
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue