Skip to content

Commit 03f6902

Browse files
committed
Merge pull request #97560 from SaracenOne/fix_anim_library_popup
Fix positioning of popup menu in AnimationLibrary editor.
2 parents b429948 + ee01fcc commit 03f6902

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

editor/plugins/animation_library_editor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
598598
file_popup->add_separator();
599599
file_popup->add_item(TTR("Open in Inspector"), FILE_MENU_EDIT_LIBRARY);
600600
Rect2 pos = tree->get_item_rect(p_item, 1, 0);
601-
Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height));
601+
Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height)) - tree->get_scroll();
602602
file_popup->popup(Rect2(popup_pos, Size2()));
603603

604604
file_dialog_animation = StringName();
@@ -638,7 +638,7 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
638638
file_popup->add_separator();
639639
file_popup->add_item(TTR("Open in Inspector"), FILE_MENU_EDIT_ANIMATION);
640640
Rect2 pos = tree->get_item_rect(p_item, 1, 0);
641-
Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height));
641+
Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height)) - tree->get_scroll();
642642
file_popup->popup(Rect2(popup_pos, Size2()));
643643

644644
file_dialog_animation = anim_name;

0 commit comments

Comments
 (0)