Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2016-09-16 16:09:21 +0300
committerJulian Eisel <eiseljulian@gmail.com>2016-09-16 16:09:21 +0300
commit661a316c7273e11c05e2b5709cf083d01ca9a7de (patch)
tree3617ff9cb0a2e00fbdba0726a66969c78db07c6a /source/blender/editors/interface/interface_regions.c
parent1df115d9a35af7e187352f11ee24a0f797db2cb2 (diff)
Picky correction to previous commit
A bit nicer to do empty-string check for operator poll message as well.
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r--source/blender/editors/interface/interface_regions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index d576f919467..7a506c5c451 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++;