Skip to content

Commit

Permalink
Merge pull request #81750 from Mickeon/fix-connection-dock-popup-for-…
Browse files Browse the repository at this point in the history
…inherited

Fix Connection dock's popups always allowing disconnect
  • Loading branch information
akien-mga committed Sep 18, 2023
2 parents 793c382 + 4471e7f commit e09ac40
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor/connections_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,11 @@ void ConnectionsDock::_rmb_pressed(const Ref<InputEvent> &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)) {
Expand Down

0 comments on commit e09ac40

Please sign in to comment.