diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-08 16:50:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-08 16:50:52 +0100 |
commit | 64a27bd0b175bdfde1e8b5b92f3929799526951c (patch) | |
tree | 5f1b29ae56b378cfa20b05586b738232f9e41755 | |
parent | e87687a6d0bd052d282b0645b7fff47c5559c981 (diff) | |
parent | 953a9be2d9f0e4e7ff0ff41801aaa13cea19c5a3 (diff) |
Merge pull request #54760 from KoBeWi/node_pupop
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 4 |
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 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<InputEvent> &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; |