UI: don't attempt to draw with the menu-key when only drawing right aligned

This commit is contained in:
2013-12-17 13:11:31 +11:00
parent d9634122f6
commit 305fc82541

View File

@@ -1122,9 +1122,6 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
char *drawstr_right = NULL;
bool use_right_only = false;
/* for underline drawing */
float font_xofs, font_yofs;
uiStyleFontSet(fstyle);
if (but->editstr || (but->drawflag & UI_BUT_TEXT_LEFT))
@@ -1217,9 +1214,11 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
glColor4ubv((unsigned char *)wcol->text);
if (!use_right_only) {
/* for underline drawing */
float font_xofs, font_yofs;
uiStyleFontDrawExt(fstyle, rect, but->drawstr + but->ofs,
drawstr_left_len - but->ofs, &font_xofs, &font_yofs);
}
if (but->menu_key != '\0') {
char fixedbuf[128];
@@ -1252,6 +1251,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
}
}
}
}
/* part text right aligned */
if (drawstr_right) {