summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-10-14 14:09:59 -0500
committerThaddeus Crews <repiteo@outlook.com>2024-10-14 14:09:59 -0500
commit03f6902c4aa2facb2eb306dec7466a90e20baea3 (patch)
tree33c15920fd48631b4e6cf9ef66360c4479f24d45
parentb42994823606eb574f66e731695578f560dc4abb (diff)
parentee01fcc71309583b38b0e19f45d5d7a88f94a8b0 (diff)
downloadredot-engine-03f6902c4aa2facb2eb306dec7466a90e20baea3.tar.gz
Merge pull request #97560 from SaracenOne/fix_anim_library_popup
Fix positioning of popup menu in AnimationLibrary editor.
-rw-r--r--editor/plugins/animation_library_editor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/animation_library_editor.cpp b/editor/plugins/animation_library_editor.cpp
index 38f8b16b34..147b92c094 100644
--- a/editor/plugins/animation_library_editor.cpp
+++ b/editor/plugins/animation_library_editor.cpp
@@ -598,7 +598,7 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
file_popup->add_separator();
file_popup->add_item(TTR("Open in Inspector"), FILE_MENU_EDIT_LIBRARY);
Rect2 pos = tree->get_item_rect(p_item, 1, 0);
- Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height));
+ Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height)) - tree->get_scroll();
file_popup->popup(Rect2(popup_pos, Size2()));
file_dialog_animation = StringName();
@@ -638,7 +638,7 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
file_popup->add_separator();
file_popup->add_item(TTR("Open in Inspector"), FILE_MENU_EDIT_ANIMATION);
Rect2 pos = tree->get_item_rect(p_item, 1, 0);
- Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height));
+ Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height)) - tree->get_scroll();
file_popup->popup(Rect2(popup_pos, Size2()));
file_dialog_animation = anim_name;