From 81efebb3a170dd6194905599361c38ae4246c434 Mon Sep 17 00:00:00 2001 From: jmb462 Date: Tue, 31 Aug 2021 17:43:35 +0200 Subject: Fix bad popups offset in editor with single window off Co-authored-by: Gil Arasa Verge Co-authored-by: Tomasz Chabora --- editor/connections_dialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'editor/connections_dialog.cpp') diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index d00fdd0ce7..2088a7e1c4 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -838,13 +838,15 @@ void ConnectionsDock::_rmb_pressed(Vector2 position) { return; } - Vector2 global_position = tree->get_global_position() + position; + Vector2 screen_position = tree->get_screen_position() + position; if (_is_item_signal(*item)) { - signal_menu->set_position(global_position); + signal_menu->set_position(screen_position); + signal_menu->reset_size(); signal_menu->popup(); } else { - slot_menu->set_position(global_position); + slot_menu->set_position(screen_position); + slot_menu->reset_size(); slot_menu->popup(); } } -- cgit v1.2.3