Make new console when needed & destroy old console

This commit is contained in:
miruka 2019-12-09 12:32:46 -04:00
parent f125b6d60e
commit f5b0cbb204
2 changed files with 11 additions and 2 deletions

View File

@ -41,6 +41,9 @@ HDrawer {
Component.onCompleted: {
if (mainUI.shortcuts.debugConsole)
mainUI.shortcuts.debugConsole.destroy()
mainUI.shortcuts.debugConsole = debugConsole
forceActiveFocus()
position = 1

View File

@ -25,9 +25,15 @@ Item {
}
HShortcut {
enabled: debugMode && debugConsole
enabled: debugMode
sequences: settings.keys.toggleDebugConsole
onActivated: debugConsole.visible = ! debugConsole.visible
onActivated: {
if (debugConsole) {
debugConsole.visible = ! debugConsole.visible
} else {
Utils.debug(mainUI || window)
}
}
}
HShortcut {