Skip to content

Commit

Permalink
Fix wrong position of Right-Click-Popup in Environment Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Jowan-Spooner committed Nov 12, 2023
1 parent 886eab6 commit 39ff279
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func _on_Environments_gui_input(event):
var context_menu : PopupMenu = $Main/HSplitContainer/Environments/ContextMenu
var index = environment_list.get_item_at_position(event.position)
if environment_list.is_selected(index) and ! environment_manager.is_read_only(index):
context_menu.popup(Rect2($Main.get_global_mouse_position(), context_menu.get_contents_minimum_size()))
context_menu.popup(Rect2(Vector2(get_position_with_decorations())+$Main.get_global_mouse_position(), context_menu.get_contents_minimum_size()))

func _on_ContextMenu_id_pressed(id):
var index = environment_list.get_selected_items()[0]
Expand Down

0 comments on commit 39ff279

Please sign in to comment.