From 953a9be2d9f0e4e7ff0ff41801aaa13cea19c5a3 Mon Sep 17 00:00:00 2001 From: kobewi Date: Mon, 8 Nov 2021 14:02:33 +0100 Subject: Improve Add Node Here popup --- editor/plugins/canvas_item_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'editor/plugins') diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 3710b26d1e..376c7d3f07 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2264,9 +2264,9 @@ bool CanvasItemEditor::_gui_input_select(const Ref &p_event) { } } - if (b.is_valid() && b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_RIGHT && b->is_ctrl_pressed()) { - add_node_menu->set_position(get_global_transform().xform(get_local_mouse_position())); + if (b.is_valid() && b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_RIGHT) { add_node_menu->set_size(Vector2(1, 1)); + add_node_menu->set_position(get_screen_position() + b->get_position()); add_node_menu->popup(); node_create_position = transform.affine_inverse().xform((get_local_mouse_position())); return true; -- cgit v1.2.3