Fix debug console history when editing entry text
This commit is contained in:
parent
d9addff8ef
commit
a3d2fc9b98
@ -31,6 +31,8 @@ Window {
|
|||||||
visible = true
|
visible = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property var pr: historyEntry
|
||||||
|
onPrChanged: print("pr changed:", pr)
|
||||||
onHistoryEntryChanged:
|
onHistoryEntryChanged:
|
||||||
inputField.text =
|
inputField.text =
|
||||||
historyEntry === -1 ? "" : history.slice(-historyEntry - 1)[0]
|
historyEntry === -1 ? "" : history.slice(-historyEntry - 1)[0]
|
||||||
@ -116,7 +118,7 @@ Window {
|
|||||||
HTextField {
|
HTextField {
|
||||||
id: inputField
|
id: inputField
|
||||||
focus: true
|
focus: true
|
||||||
onAccepted: if (text) { runJS(text); text = "" }
|
onAccepted: if (text) { runJS(text); text = ""; historyEntry = -1 }
|
||||||
backgroundColor: Qt.hsla(0, 0, 0, 0.85)
|
backgroundColor: Qt.hsla(0, 0, 0, 0.85)
|
||||||
bordered: false
|
bordered: false
|
||||||
placeholderText: qsTr("Type some JavaScript...")
|
placeholderText: qsTr("Type some JavaScript...")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user