operator buttons get a red highlight when alert is set for the layout

This commit is contained in:
Campbell Barton 2011-06-05 17:02:57 +00:00
parent 68d4c64db8
commit 68a3303013
2 changed files with 3 additions and 2 deletions

@ -154,8 +154,6 @@ int BLI_split_name_num(char *left, int *nr, const char *name, const char delim)
{
int a;
/* could use '0', but this would mean the first
* duplicate would become FooBar.000 */
*nr= 0;
a= strlen(name);
memcpy(left, name, (a + 1) * sizeof(char));

@ -651,6 +651,9 @@ PointerRNA uiItemFullO(uiLayout *layout, const char *opname, const char *name, i
if (flag & UI_ITEM_R_NO_BG)
uiBlockSetEmboss(block, UI_EMBOSS);
if(layout->redalert)
uiButSetFlag(but, UI_BUT_REDALERT);
/* assign properties */
if(properties || (flag & UI_ITEM_O_RETURN_PROPS)) {
PointerRNA *opptr= uiButGetOperatorPtrRNA(but);