Do not show %t to user on right click menu buttons which use "Name%t|...%x0|..." syntax

This commit is contained in:
Sv. Lockal
2012-09-04 17:09:40 +00:00
parent b3797d904d
commit 927b7ed303

View File

@@ -3722,8 +3722,14 @@ void uiButGetStrInfo(bContext *C, uiBut *but, int nbr, ...)
if (type == BUT_GET_LABEL) {
if (but->str) {
/* Menu labels can have some complex formating stuff marked by pipes, we don't want those here! */
char *tc = strchr(but->str, '|');
/* Menu labels can have some complex formating stuff marked by pipes or %t, we don't want those here! */
const char *tc;
if (but->type == MENU)
tc = strstr(but->str, "%t");
else
tc = strchr(but->str, '|');
if (tc)
tmp = BLI_strdupn(but->str, tc - but->str);
else