Skip to content

Commit 8dff467

Browse files
committed
Fix #4919
1 parent 9d3063e commit 8dff467

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

src/qml/LogView.qml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ FastTextView {
1010

1111
model: ListModel {}
1212

13+
function dumpText() {
14+
var allStrings = "";
15+
for (var ind=0; ind < root.model.count; ind++) {
16+
allStrings += root.model.get(ind)["msg"] + "\n"
17+
}
18+
return allStrings
19+
}
20+
1321
color: sysPalette.base
1422
border.color: sysPalette.shadow
1523
border.width: 1

src/qml/common/FastTextView.qml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ Rectangle {
1212
listView.positionViewAtEnd()
1313
}
1414

15+
function dumpText() {
16+
var allStrings = "";
17+
for (var id in root.model) {
18+
allStrings += root.model[id] + "\n"
19+
}
20+
return allStrings
21+
}
22+
1523
ScrollView {
1624
anchors.fill: parent
1725
anchors.margins: 10
@@ -22,8 +30,11 @@ Rectangle {
2230
id: listView
2331
width: root.width - 20
2432

25-
delegate: BetterLabel {
33+
delegate: TextEdit {
34+
color: sysPalette.text
2635
width: listView.width
36+
readOnly: true
37+
selectByMouse: true
2738
text: {
2839
if (root.showLineNumbers) {
2940
return (index+1) + ". " + modelData
@@ -56,13 +67,8 @@ Rectangle {
5667
icon.source: "qrc:/images/copy.svg"
5768
icon.color: "transparent"
5869

59-
onTriggered: {
60-
var allStrings = "";
61-
for (var id in affectedKeysListView.model) {
62-
allStrings += affectedKeysListView.model[id] + "\n"
63-
}
64-
qmlUtils.copyToClipboard(allStrings)
65-
allStrings = ""
70+
onTriggered: {
71+
qmlUtils.copyToClipboard(root.dumpText())
6672
}
6773
}
6874
}

0 commit comments

Comments
 (0)