Skip to content

Commit 1cc459d

Browse files
WhalesStateKoBeWi
andcommitted
Fix Editor wayland first scan task error.
Co-authored-by: Tomasz Chabora <[email protected]>
1 parent 006e3f2 commit 1cc459d

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

editor/editor_node.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ void EditorNode::_notification(int p_what) {
851851

852852
command_palette->register_shortcuts_as_command();
853853

854-
callable_mp(this, &EditorNode::_begin_first_scan).call_deferred();
854+
_begin_first_scan();
855855

856856
last_dark_mode_state = DisplayServer::get_singleton()->is_dark_mode();
857857
last_system_accent_color = DisplayServer::get_singleton()->get_accent_color();

editor/gui/progress_dialog.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ void ProgressDialog::_popup() {
166166

167167
center_panel->set_custom_minimum_size(ms);
168168

169+
if (is_ready()) {
170+
_reparent_and_show();
171+
} else {
172+
callable_mp(this, &ProgressDialog::_reparent_and_show).call_deferred();
173+
}
174+
}
175+
176+
void ProgressDialog::_reparent_and_show() {
169177
Window *current_window = SceneTree::get_singleton()->get_root()->get_last_exclusive_window();
170178
ERR_FAIL_NULL(current_window);
171179
reparent(current_window);

editor/gui/progress_dialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class ProgressDialog : public CenterContainer {
8989
void _cancel_pressed();
9090

9191
void _update_ui();
92+
void _reparent_and_show();
9293
bool canceled = false;
9394

9495
protected:

0 commit comments

Comments
 (0)