diff --git a/bugbot.gd b/bugbot.gd index 6d00e73..eb09ed0 100644 --- a/bugbot.gd +++ b/bugbot.gd @@ -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: