From 914121a98062c97b94abe74f631a4359bf085fee Mon Sep 17 00:00:00 2001 From: Iceflower Date: Tue, 3 Oct 2023 14:42:10 +0200 Subject: [PATCH] [licenses] Popup grabs focus if already visible --- addons/licenses/plugin.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/licenses/plugin.gd b/addons/licenses/plugin.gd index c34d39a..02c8fe4 100644 --- a/addons/licenses/plugin.gd +++ b/addons/licenses/plugin.gd @@ -27,7 +27,10 @@ func _exit_tree() -> void: self.remove_export_plugin(self.export_plugin) func _show_popup() -> void: - self.licenses_dialog.popup_centered_ratio(0.4) + if licenses_dialog.visible: + self.licenses_dialog.grab_focus() + else: + self.licenses_dialog.popup_centered_ratio(0.4) static func set_project_setting(key: String, initial_value, type: int, type_hint: int) -> void: if not ProjectSettings.has_setting(key):