Merge pull request #40028 from reduz/fix-popups1
Fix some popup menus missing screen transform.
This commit is contained in:
commit
b11da7b703
@ -2313,7 +2313,7 @@ void FileSystemDock::_tree_rmb_select(const Vector2 &p_pos) {
|
||||
tree_popup->clear();
|
||||
tree_popup->set_size(Size2(1, 1));
|
||||
_file_and_folders_fill_popup(tree_popup, paths);
|
||||
tree_popup->set_position(tree->get_global_position() + p_pos);
|
||||
tree_popup->set_position(tree->get_screen_position() + p_pos);
|
||||
tree_popup->popup();
|
||||
}
|
||||
}
|
||||
|
@ -2399,7 +2399,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
|
||||
}
|
||||
|
||||
menu->set_size(Size2(1, 1));
|
||||
menu->set_position(p_menu_pos);
|
||||
menu->set_position(get_screen_position() + p_menu_pos);
|
||||
menu->popup();
|
||||
return;
|
||||
}
|
||||
|
@ -1072,7 +1072,7 @@ void SceneTreeEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data,
|
||||
}
|
||||
|
||||
void SceneTreeEditor::_rmb_select(const Vector2 &p_pos) {
|
||||
emit_signal("rmb_pressed", tree->get_global_transform().xform(p_pos));
|
||||
emit_signal("rmb_pressed", tree->get_screen_transform().xform(p_pos));
|
||||
}
|
||||
|
||||
void SceneTreeEditor::_warning_changed(Node *p_for_node) {
|
||||
|
@ -51,7 +51,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
|
||||
|
||||
if (b.is_valid()) {
|
||||
if (b->is_pressed() && b->get_button_index() == BUTTON_RIGHT && context_menu_enabled) {
|
||||
menu->set_position(get_global_transform().xform(get_local_mouse_position()));
|
||||
menu->set_position(get_screen_transform().xform(get_local_mouse_position()));
|
||||
menu->set_size(Vector2(1, 1));
|
||||
//menu->set_scale(get_global_transform().get_scale());
|
||||
menu->popup();
|
||||
|
Loading…
Reference in New Issue
Block a user