From 3933615f67b919008e789dfdf0473002dc3d854c Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 29 Jun 2020 11:16:23 -0400 Subject: [PATCH] Fix menu/popup destruction disabling keybinds --- TODO.md | 1 - src/gui/Base/HMenu.qml | 1 + src/gui/Base/HPopup.qml | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index a34bc593..95fe9cf9 100644 --- a/TODO.md +++ b/TODO.md @@ -12,7 +12,6 @@ - Replying to one of our own message that's currently only a local echo results in a reply to an empty ID -- Need to unregister popups/menus when they are destroyed without being closed - Bottom focus line for an `HTextArea` inside a `ScrollView` is invisible, put the background on `ScrollView` instead? diff --git a/src/gui/Base/HMenu.qml b/src/gui/Base/HMenu.qml index f4d0d15e..c45cf4b7 100644 --- a/src/gui/Base/HMenu.qml +++ b/src/gui/Base/HMenu.qml @@ -41,6 +41,7 @@ Menu { delete window.visibleMenus[uuid] window.visibleMenusChanged() } + Component.onDestruction: closed() property var previouslyFocused: null diff --git a/src/gui/Base/HPopup.qml b/src/gui/Base/HPopup.qml index 711eced4..855a1a48 100644 --- a/src/gui/Base/HPopup.qml +++ b/src/gui/Base/HPopup.qml @@ -43,6 +43,7 @@ Popup { delete window.visiblePopups[uuid] window.visibleMenusChanged() } + Component.onDestruction: closed() property var previouslyFocused: null