Skip to content

Commit 0a3a483

Browse files
committed
Fix native file dialog showing on loading project in editor.
1 parent b214aa8 commit 0a3a483

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scene/gui/file_dialog.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ void FileDialog::popup(const Rect2i &p_rect) {
7676
#ifdef TOOLS_ENABLED
7777
if (is_part_of_edited_scene()) {
7878
ConfirmationDialog::popup(p_rect);
79+
return;
7980
}
8081
#endif
8182

@@ -1380,7 +1381,7 @@ void FileDialog::set_use_native_dialog(bool p_native) {
13801381
#endif
13811382

13821383
// Replace the built-in dialog with the native one if it's currently visible.
1383-
if (is_visible() && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_NATIVE_DIALOG_FILE) && (use_native_dialog || OS::get_singleton()->is_sandboxed())) {
1384+
if (is_inside_tree() && is_visible() && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_NATIVE_DIALOG_FILE) && (use_native_dialog || OS::get_singleton()->is_sandboxed())) {
13841385
ConfirmationDialog::set_visible(false);
13851386
_native_popup();
13861387
}

0 commit comments

Comments
 (0)