Picky correction to previous commit

A bit nicer to do empty-string check for operator poll message as well.
This commit is contained in:
Julian Eisel 2016-09-16 15:09:21 +02:00
parent 1df115d9a3
commit 661a316c72
1 changed files with 2 additions and 2 deletions

View File

@ -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++;