Fix T56811: Do not show cancel button for jobs when UI is locked.

Since that button is then totally useless and unusable...
This commit is contained in:
Bastien Montagne 2018-09-17 10:22:00 +02:00
parent 66ad9ef2ce
commit 640fcc25a4
Notes: blender-bot 2023-02-14 09:19:09 +01:00
Referenced by issue #56811, Soft body (point cache) bake cannot be aborted using the "X" button
1 changed files with 5 additions and 3 deletions

View File

@ -3876,9 +3876,11 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
UI_but_func_tooltip_set(but_progress, progress_tooltip_func, tip_arg);
}
uiDefIconTextBut(block, UI_BTYPE_BUT, handle_event, ICON_PANEL_CLOSE,
"", 0, 0, UI_UNIT_X, UI_UNIT_Y,
NULL, 0.0f, 0.0f, 0, 0, TIP_("Stop this job"));
if (!wm->is_interface_locked) {
uiDefIconTextBut(block, UI_BTYPE_BUT, handle_event, ICON_PANEL_CLOSE,
"", 0, 0, UI_UNIT_X, UI_UNIT_Y,
NULL, 0.0f, 0.0f, 0, 0, TIP_("Stop this job"));
}
}
if (screen->animtimer)