diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 3bc3dffa586..d27a40779e5 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -91,6 +91,13 @@ VBoxContainer *FileDialog::get_vbox() { return vbox; } +void FileDialog::_validate_property(PropertyInfo &p_property) const { + if (p_property.name == "dialog_text") { + // File dialogs have a custom layout, and dialog nodes can't have both a text and a layout. + p_property.usage = PROPERTY_USAGE_NONE; + } +} + void FileDialog::_notification(int p_what) { switch (p_what) { case NOTIFICATION_VISIBILITY_CHANGED: { diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h index 58208ad2d59..739cb3e31af 100644 --- a/scene/gui/file_dialog.h +++ b/scene/gui/file_dialog.h @@ -166,6 +166,7 @@ private: virtual void _post_popup() override; protected: + void _validate_property(PropertyInfo &p_property) const; void _notification(int p_what); static void _bind_methods();