Cleanup: Use flag type explicitly

Using the `uiButtonGroupFlag` type explicitly can avoid the need
to look up which enum should be used as an argument.
This commit is contained in:
Hans Goudey 2021-01-04 17:35:14 -06:00
parent 5a6dfb7571
commit 9b17e71c23
Notes: blender-bot 2023-02-14 05:12:59 +01:00
Referenced by issue #84470, Undo Can Get Stuck If Sculpt Mode Has Been Entered via Undo
Referenced by issue #84420, Linking Materials causes Regular Materials to be used in Grease Pencil
Referenced by issue #82856, After updating the video card drivers to 20.11.2, interface artifacts appeared.
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@
* Every function that adds a set of buttons must create another group,
* then #ui_def_but adds buttons to the current group (the last).
*/
void ui_block_new_button_group(uiBlock *block, short flag)
void ui_block_new_button_group(uiBlock *block, uiButtonGroupFlag flag)
{
/* Don't create a new group if there is a "lock" on new groups. */
if (!BLI_listbase_is_empty(&block->button_groups)) {

View File

@ -1039,7 +1039,7 @@ void ui_item_menutype_func(struct bContext *C, struct uiLayout *layout, void *ar
void ui_item_paneltype_func(struct bContext *C, struct uiLayout *layout, void *arg_pt);
/* interface_button_group.c */
void ui_block_new_button_group(uiBlock *block, short flag);
void ui_block_new_button_group(uiBlock *block, uiButtonGroupFlag flag);
void ui_button_group_add_but(uiBlock *block, uiBut *but);
void ui_button_group_replace_but_ptr(uiBlock *block, const void *old_but_ptr, uiBut *new_but);
void ui_block_free_button_groups(uiBlock *block);