Fix 2D editor menu position

This commit is contained in:
kobewi 2022-04-08 17:09:40 +02:00
parent bf153b82c7
commit 216fe8f8d9

View File

@ -2298,7 +2298,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
} }
add_node_menu->reset_size(); add_node_menu->reset_size();
add_node_menu->set_position(get_screen_transform().xform(b->get_position())); add_node_menu->set_position(viewport->get_screen_transform().xform(b->get_position()));
add_node_menu->popup(); add_node_menu->popup();
node_create_position = transform.affine_inverse().xform(b->get_position()); node_create_position = transform.affine_inverse().xform(b->get_position());
return true; return true;