Skip to content

Commit 2d1453c

Browse files
committed
Merge pull request godotengine#108436 from AeioMuch/scroll_scene_tree_if_move_item_with_keys
Scroll scene tree dock when moving item(s) with keys
2 parents 7dcc054 + 5a38042 commit 2d1453c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

editor/docks/scene_tree_dock.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
872872

873873
undo_redo->commit_action();
874874

875+
NodePath np = selection.front()->get()->get_path();
876+
TreeItem *item = scene_tree->get_scene_tree()->get_item_with_metadata(np);
877+
callable_mp(scene_tree->get_scene_tree(), &Tree::scroll_to_item).call_deferred(item, false);
875878
} break;
876879
case TOOL_DUPLICATE: {
877880
if (!profile_allow_editing) {

0 commit comments

Comments
 (0)