[Bf-blender-cvs] [640fcc25a4a] master: Fix T56811: Do not show cancel button for jobs when UI is locked.

Bastien Montagne noreply at git.blender.org
Mon Sep 17 10:23:28 CEST 2018


Commit: 640fcc25a4a227c816cf4523e467f03cbafab9e9
Author: Bastien Montagne
Date:   Mon Sep 17 10:22:00 2018 +0200
Branches: master
https://developer.blender.org/rB640fcc25a4a227c816cf4523e467f03cbafab9e9

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

Since that button is then totally useless and unusable...

===================================================================

M	source/blender/editors/interface/interface_templates.c

===================================================================

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)



More information about the Bf-blender-cvs mailing list