DebugConsole: don't reset target on toggle()
This commit is contained in:
parent
4602366b9c
commit
70f67f01ac
|
@ -73,14 +73,18 @@ HDrawer {
|
||||||
readonly property alias commandsView: commandsView
|
readonly property alias commandsView: commandsView
|
||||||
|
|
||||||
|
|
||||||
function toggle(targetItem=mainUI, js="", addToHistory=false) {
|
function toggle(targetItem=null, js="", addToHistory=false) {
|
||||||
if (debugConsole.visible) {
|
if (debugConsole.visible) {
|
||||||
debugConsole.visible = false
|
debugConsole.visible = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
debugConsole.visible = true
|
debugConsole.visible = true
|
||||||
debugConsole.target = targetItem
|
debugConsole.target =
|
||||||
|
! targetItem && ! debugConsole.target ? mainUI :
|
||||||
|
targetItem ? targetItem :
|
||||||
|
debugConsole.target
|
||||||
|
|
||||||
if (js) debugConsole.runJS(js, addToHistory)
|
if (js) debugConsole.runJS(js, addToHistory)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user