Cleanup: minor UI code changes

- Rename ui_but_find_active_in_region -> ui_region_find_active_but
- Remove ui_but_is_active (use ui_region_find_active_but instead)
- Re-order ui_but_* functions take the button as their first arg.
This commit is contained in:
2019-03-23 00:18:16 +11:00
parent 8f3ecd08e1
commit be750e2aee
5 changed files with 37 additions and 43 deletions

View File

@@ -1521,7 +1521,7 @@ static int drop_color_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(
/* find button under mouse, check if it has RNA color property and
* if it does copy the data */
but = ui_but_find_active_in_region(ar);
but = ui_region_find_active_but(ar);
if (but && but->type == UI_BTYPE_COLOR && but->rnaprop) {
const int color_len = RNA_property_array_length(&but->rnapoin, but->rnaprop);