Disable progress dialog on export from command line, stab at fixing #24031
This commit is contained in:
parent
b47d4e1ba5
commit
ab9bbce311
2 changed files with 21 additions and 5 deletions
|
@ -3249,17 +3249,31 @@ Ref<Texture> EditorNode::get_class_icon(const String &p_class, const String &p_f
|
|||
|
||||
void EditorNode::progress_add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel) {
|
||||
|
||||
singleton->progress_dialog->add_task(p_task, p_label, p_steps, p_can_cancel);
|
||||
if (singleton->disable_progress_dialog) {
|
||||
print_line(p_task + ": begin: " + p_label + " steps: " + itos(p_steps));
|
||||
} else {
|
||||
singleton->progress_dialog->add_task(p_task, p_label, p_steps, p_can_cancel);
|
||||
}
|
||||
}
|
||||
|
||||
bool EditorNode::progress_task_step(const String &p_task, const String &p_state, int p_step, bool p_force_refresh) {
|
||||
|
||||
return singleton->progress_dialog->task_step(p_task, p_state, p_step, p_force_refresh);
|
||||
if (singleton->disable_progress_dialog) {
|
||||
print_line("\t" + p_task + ": step " + itos(p_step) + ": " + p_state);
|
||||
return false;
|
||||
} else {
|
||||
|
||||
return singleton->progress_dialog->task_step(p_task, p_state, p_step, p_force_refresh);
|
||||
}
|
||||
}
|
||||
|
||||
void EditorNode::progress_end_task(const String &p_task) {
|
||||
|
||||
singleton->progress_dialog->end_task(p_task);
|
||||
if (singleton->disable_progress_dialog) {
|
||||
print_line(p_task + ": end");
|
||||
} else {
|
||||
singleton->progress_dialog->end_task(p_task);
|
||||
}
|
||||
}
|
||||
|
||||
void EditorNode::progress_add_task_bg(const String &p_task, const String &p_label, int p_steps) {
|
||||
|
@ -3341,7 +3355,7 @@ Error EditorNode::export_preset(const String &p_preset, const String &p_path, bo
|
|||
export_defer.path = p_path;
|
||||
export_defer.debug = p_debug;
|
||||
export_defer.password = p_password;
|
||||
|
||||
disable_progress_dialog = true;
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
@ -4731,7 +4745,7 @@ EditorNode::EditorNode() {
|
|||
_initializing_addons = false;
|
||||
docks_visible = true;
|
||||
restoring_scenes = false;
|
||||
|
||||
disable_progress_dialog = false;
|
||||
scene_distraction = false;
|
||||
script_distraction = false;
|
||||
|
||||
|
|
|
@ -525,6 +525,8 @@ private:
|
|||
|
||||
} export_defer;
|
||||
|
||||
bool disable_progress_dialog;
|
||||
|
||||
static EditorNode *singleton;
|
||||
|
||||
static Vector<EditorNodeInitCallback> _init_callbacks;
|
||||
|
|
Loading…
Reference in a new issue