operator buttons get a red highlight when alert is set for the layout
authorCampbell Barton <ideasman42@gmail.com>
Sun, 5 Jun 2011 17:02:57 +0000 (17:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 5 Jun 2011 17:02:57 +0000 (17:02 +0000)
source/blender/blenlib/intern/path_util.c
source/blender/editors/interface/interface_layout.c

index b2b4817..af87707 100644 (file)
@@ -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));
index b68634a..55c1488 100644 (file)
@@ -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);