diff options
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index a828c19be54..95791dc8811 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -160,6 +160,7 @@ struct uiLayout { short space; bool align; bool active; + bool activate_init; bool enabled; bool redalert; bool keepaspect; @@ -1818,6 +1819,9 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index if (layout->redalert) UI_but_flag_enable(but, UI_BUT_REDALERT); + + if (layout->activate_init) + UI_but_flag_enable(but, UI_BUT_ACTIVATE_ON_INIT); } /* single button */ else { @@ -1831,6 +1835,9 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index if (layout->redalert) UI_but_flag_enable(but, UI_BUT_REDALERT); + + if (layout->activate_init) + UI_but_flag_enable(but, UI_BUT_ACTIVATE_ON_INIT); } /* Mark non-embossed textfields inside a listbox. */ @@ -3949,6 +3956,11 @@ void uiLayoutSetActive(uiLayout *layout, bool active) layout->active = active; } +void uiLayoutSetActivateInit(uiLayout *layout, bool activate_init) +{ + layout->activate_init = activate_init; +} + void uiLayoutSetEnabled(uiLayout *layout, bool enabled) { layout->enabled = enabled; @@ -4019,6 +4031,11 @@ bool uiLayoutGetActive(uiLayout *layout) return layout->active; } +bool uiLayoutGetActivateInit(uiLayout *layout) +{ + return layout->activate_init; +} + bool uiLayoutGetEnabled(uiLayout *layout) { return layout->enabled; |