From 640fcc25a4a227c816cf4523e467f03cbafab9e9 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 17 Sep 2018 10:22:00 +0200 Subject: Fix T56811: Do not show cancel button for jobs when UI is locked. Since that button is then totally useless and unusable... --- source/blender/editors/interface/interface_templates.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index d9be0abfb78..be489072439 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -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) -- cgit v1.2.3