Skip to content

Commit

Permalink
[licenses] Popup grabs focus if already visible
Browse files Browse the repository at this point in the history
  • Loading branch information
IceflowRE committed Oct 3, 2023
1 parent 939d493 commit 914121a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion addons/licenses/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 914121a

Please sign in to comment.