From 4471e7fe92d1c47e5aac94c3a50e6c6752198ebd Mon Sep 17 00:00:00 2001 From: Micky Date: Sat, 16 Sep 2023 20:12:30 +0200 Subject: [PATCH] Fix Connection dock's popups always allowing disconnect --- editor/connections_dialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 11fc5efd623..c73219744d3 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -1213,6 +1213,11 @@ void ConnectionsDock::_rmb_pressed(const Ref &p_event) { return; } + if (item->is_selectable(0)) { + // Update selection now, before `about_to_popup` signal. Needed for SIGNAL and CONNECTION context menus. + tree->set_selected(item); + } + Vector2 screen_position = tree->get_screen_position() + mb_event->get_position(); switch (_get_item_type(*item)) {