Fix copying event when no selection or focused
This commit is contained in:
parent
af861ac13a
commit
d991d04a8c
|
@ -210,7 +210,7 @@ HColumnLayout {
|
||||||
qsTr("Copy text")
|
qsTr("Copy text")
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (! eventList.selectedCount && eventList.currentItem === -1){
|
if (! eventList.selectedCount && ! eventList.currentItem){
|
||||||
Clipboard.text = JSON.parse(model.source).body
|
Clipboard.text = JSON.parse(model.source).body
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,7 +203,9 @@ QtObject {
|
||||||
return ev.content
|
return ev.content
|
||||||
|
|
||||||
if (type === "RedactedEvent") {
|
if (type === "RedactedEvent") {
|
||||||
print("c", ev.content)
|
// FIXME: this can generate an "argument missing" warning because
|
||||||
|
// QML first gets notified of the event type change, *then* of the
|
||||||
|
// content change.
|
||||||
let content = qsTr(escapeHtml(ev.content)).arg(sender)
|
let content = qsTr(escapeHtml(ev.content)).arg(sender)
|
||||||
|
|
||||||
if (ev.content.includes("%2"))
|
if (ev.content.includes("%2"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user