浏览代码

Fix ProgressDialog in single window mode

kobewi 7 月之前
父节点
当前提交
7a85b19e5a
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      editor/progress_dialog.cpp

+ 1 - 5
editor/progress_dialog.cpp

@@ -166,11 +166,7 @@ void ProgressDialog::_popup() {
 
 	center_panel->set_custom_minimum_size(ms);
 
-	Window *current_window = Window::get_from_id(DisplayServer::get_singleton()->get_focused_window());
-	if (!current_window) {
-		current_window = get_tree()->get_root();
-	}
-
+	Window *current_window = get_last_exclusive_window();
 	reparent(current_window);
 
 	// Ensures that events are properly released before the dialog blocks input.