Markers are deselected once the bug info popup is closed, mostly to prevent errors when switching between tabs while markers are selected.

This commit is contained in:
Jamie Greunbaum 2024-06-06 00:03:29 -04:00
parent 843ac8f765
commit 41cc9305cf

View File

@ -149,14 +149,15 @@ func __on_marker_selection_changed() -> void:
var bug_info : BugbotBugData = selected_marker.bug_info
bug_popup.dialog_text = &"%s\n%s\n%s" % [bug_info.title, bug_info.severity, "Open" if bug_info.is_open else "Closed"]
bug_popup.ok_button_text = &"Open In Browser"
bug_popup.get_ok_button().pressed.connect(__marker_selection_open_bug_page.bind(bug_info))
bug_popup.get_ok_button().pressed.connect(__marker_selection_open_bug_page.bind(bug_info, selected_marker))
bug_popup.cancel_button_text = &"Cancel"
bug_popup.get_cancel_button().pressed.connect(__marker_selection_cancelled)
bug_popup.get_cancel_button().pressed.connect(__marker_selection_cancelled.bind(selected_marker))
bug_popup.popup_exclusive_centered(selected_marker)
func __marker_selection_open_bug_page(bug_data:BugbotBugData):
func __marker_selection_open_bug_page(bug_data:BugbotBugData, selected_marker:Node):
get_editor_interface().get_selection().remove_node(selected_marker)
OS.shell_open(__editor_server_api._get_bug_url(bug_data))
func __marker_selection_cancelled():
pass
func __marker_selection_cancelled(selected_marker:Node):
get_editor_interface().get_selection().remove_node(selected_marker)
func __on_editor_tab_switched(new_scene:Node) -> void: