summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-07-21 16:34:16 +0200
committerGitHub <noreply@github.com>2022-07-21 16:34:16 +0200
commitf40aafeb3963e58a7f7d219f57d898bd95704905 (patch)
tree48d86417ad8e2eef26f9b2727d0aabaeb81c4231
parent35d7b94a54e3a5b6ecc1dda5f0811490a37f735a (diff)
parentdabe021f19a842ee092407c64f19dcfea2cda5d9 (diff)
Merge pull request #63244 from KoBeWi/canvas_picker
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 99ddd167d4..82772178e0 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2282,7 +2282,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
}
selection_menu_additive_selection = b->is_shift_pressed();
- selection_menu->set_position(get_screen_position() + b->get_position());
+ selection_menu->set_position(viewport->get_screen_transform().xform(b->get_position()));
selection_menu->reset_size();
selection_menu->popup();
return true;
@@ -5376,7 +5376,7 @@ CanvasItemEditor::CanvasItemEditor() {
add_child(selection_menu);
selection_menu->set_min_size(Vector2(100, 0));
selection_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_selection_result_pressed));
- selection_menu->connect("popup_hide", callable_mp(this, &CanvasItemEditor::_selection_menu_hide));
+ selection_menu->connect("popup_hide", callable_mp(this, &CanvasItemEditor::_selection_menu_hide), varray(), CONNECT_DEFERRED);
add_node_menu = memnew(PopupMenu);
add_child(add_node_menu);