X Tutup
Skip to content

Doc: Add missing func keyword to EditorDock._update_layout example#113381

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
Eshaan-byte:fix-editordock-func-keyword
Dec 1, 2025
Merged

Doc: Add missing func keyword to EditorDock._update_layout example#113381
akien-mga merged 1 commit intogodotengine:masterfrom
Eshaan-byte:fix-editordock-func-keyword

Conversation

@Eshaan-byte
Copy link
Contributor

Summary

Fixes #113324

This PR fixes a documentation error in the EditorDock._update_layout code example where the func keyword was missing from the method declaration.

Issue

The code snippet demonstrating how to override the _update_layout method was missing the required func keyword, making it invalid GDScript syntax.

Changes Made

Added the func keyword to the _update_layout method in the code example at line 59 of doc/classes/EditorDock.xml.

Before:

_update_layout(layout):
    box_container.vertical = (layout == DOCK_LAYOUT_VERTICAL)
After:
func _update_layout(layout):
    box_container.vertical = (layout == DOCK_LAYOUT_VERTICAL)

The code snippet demonstrating method overriding for _update_layout
was missing the func keyword, which is required in GDScript method
declarations.
@Eshaan-byte Eshaan-byte requested a review from a team as a code owner December 1, 2025 02:10
@dalexeev dalexeev added bug documentation cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Dec 1, 2025
@dalexeev dalexeev added this to the 4.6 milestone Dec 1, 2025
@dalexeev dalexeev removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Dec 1, 2025
@akien-mga akien-mga changed the title Doc: Add missing func keyword to EditorDock._update_layout example Doc: Add missing func keyword to EditorDock._update_layout example Dec 1, 2025
@akien-mga akien-mga merged commit 39c7479 into godotengine:master Dec 1, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code snippet for EditorDock._update_layout classref lacks func keyword

4 participants

X Tutup