Fix native file dialogs being shown on set_visible(false)

This commit is contained in:
Anni Ryynänen 2024-06-09 17:54:18 +03:00
parent 5833f59786
commit b14b222e9d
No known key found for this signature in database
GPG key ID: 0C29030C4FA87DDC

View file

@ -99,7 +99,9 @@ void FileDialog::set_visible(bool p_visible) {
#endif
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_NATIVE_DIALOG_FILE) && (use_native_dialog || OS::get_singleton()->is_sandboxed())) {
_native_popup();
if (p_visible) {
_native_popup();
}
} else {
ConfirmationDialog::set_visible(p_visible);
}