Commit: 661a316c7273e11c05e2b5709cf083d01ca9a7de
Author: Julian Eisel
Date:   Fri Sep 16 15:09:21 2016 +0200
Branches: master
https://developer.blender.org/rB661a316c7273e11c05e2b5709cf083d01ca9a7de

Picky correction to previous commit

A bit nicer to do empty-string check for operator poll message as well.

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

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

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

diff --git a/source/blender/editors/interface/interface_regions.c 
b/source/blender/editors/interface/interface_regions.c
index d576f91..7a506c5 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -466,11 +466,11 @@ static uiTooltipData 
*ui_tooltip_data_from_button(bContext *C, uiBut *but)
                        disabled_msg = CTX_wm_operator_poll_msg_get(C);
                }
                /* alternatively, buttons can store some reasoning too */
-               else if (but->lockstr && but->lockstr[0]) {
+               else if (but->lockstr) {
                        disabled_msg = but->lockstr;
                }
 
-               if (disabled_msg) {
+               if (disabled_msg && disabled_msg[0]) {
                        BLI_snprintf(data->lines[data->totline], 
sizeof(data->lines[0]), TIP_("Disabled: %s"), disabled_msg);
                        data->format[data->totline].color_id = UI_TIP_LC_ALERT;
                        data->totline++;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to