Merge pull request #113742 from bruvzg/fd_pop_base

Restore `FileDialog::_popup_base`
pull/113650/head
Thaddeus Crews 2025-12-08 11:54:02 +07:00
commit f3e8007ce7
No known key found for this signature in database
GPG Key ID: 8C6E5FEB5FC03CCC
2 changed files with 17 additions and 0 deletions

@ -95,6 +95,21 @@ bool FileDialog::_can_use_native_popup() const {
return DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_NATIVE_DIALOG_FILE);
}
void FileDialog::_popup_base(const Rect2i &p_screen_rect) {
#ifdef TOOLS_ENABLED
if (is_part_of_edited_scene()) {
ConfirmationDialog::_popup_base(p_screen_rect);
return;
}
#endif
if (_should_use_native_popup()) {
_native_popup();
} else {
ConfirmationDialog::_popup_base(p_screen_rect);
}
}
void FileDialog::set_visible(bool p_visible) {
if (p_visible) {
_update_option_controls();

@ -374,6 +374,8 @@ protected:
virtual bool _should_hide_file(const String &p_file) const { return false; }
virtual Color _get_folder_color(const String &p_path) const { return theme_cache.folder_icon_color; }
virtual void _popup_base(const Rect2i &p_screen_rect = Rect2i()) override;
void _validate_property(PropertyInfo &p_property) const;
void _notification(int p_what);
bool _set(const StringName &p_name, const Variant &p_value) { return property_helper.property_set_value(p_name, p_value); }