diff options
author | Fabian Schempp <fabianschempp@googlemail.com> | 2021-06-25 08:57:24 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2021-06-25 08:57:24 +0300 |
commit | ae085e301c2aac0d6956609bfe93a90a19f0e235 (patch) | |
tree | 38b86749807915a6b6d46504a2acb90e41a4a77a /source/blender/editors/interface/interface_handlers.c | |
parent | 841df831e89dfc4011c323203c2efb8265dc1878 (diff) |
Spreadsheet: Dataset region for spreadsheet editor
This patch adds a left aligned sidebar to the spreadsheet editor. This
Sidebar can be used to navigate the geometry component types and
attribute domains. It also provides a quick overview of domain sizes.
It replaces the two dropdowns in the regions header.
Next step will be to add the domain cycling shortcut
using the CTRL + mouse wheel.
Reviewer: Dalai Felinto (dfelinto), Julian Eisel (Severin),
Hans Goudey (HooglyBoogly).
Differential Revision: https://developer.blender.org/D11046
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 34465502c71..7d866ec17d2 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -1461,12 +1461,9 @@ static bool ui_drag_toggle_but_is_supported(const uiBut *but) /* Button pushed state to compare if other buttons match. Can be more * then just true or false for toggle buttons with more than 2 states. */ -static int ui_drag_toggle_but_pushed_state(bContext *C, uiBut *but) +static int ui_drag_toggle_but_pushed_state(uiBut *but) { if (but->rnapoin.data == NULL && but->poin == NULL && but->icon) { - if (but->pushed_state_func) { - return but->pushed_state_func(C, but->pushed_state_arg); - } /* Assume icon identifies a unique state, for buttons that * work through functions callbacks and don't have an boolean * value that indicates the state. */ @@ -1513,7 +1510,7 @@ static bool ui_drag_toggle_set_xy_xy( /* execute the button */ if (ui_drag_toggle_but_is_supported(but)) { /* is it pressed? */ - const int pushed_state_but = ui_drag_toggle_but_pushed_state(C, but); + const int pushed_state_but = ui_drag_toggle_but_pushed_state(but); if (pushed_state_but != pushed_state) { UI_but_execute(C, region, but); if (do_check) { @@ -1943,7 +1940,7 @@ static bool ui_but_drag_init(bContext *C, * typically 'button_activate_exit()' handles this */ ui_apply_but_autokey(C, but); - drag_info->pushed_state = ui_drag_toggle_but_pushed_state(C, but); + drag_info->pushed_state = ui_drag_toggle_but_pushed_state(but); drag_info->but_cent_start[0] = BLI_rctf_cent_x(&but->rect); drag_info->but_cent_start[1] = BLI_rctf_cent_y(&but->rect); copy_v2_v2_int(drag_info->xy_init, &event->x); @@ -2187,6 +2184,9 @@ static void ui_apply_but( case UI_BTYPE_LISTROW: ui_apply_but_ROW(C, block, but, data); break; + case UI_BTYPE_DATASETROW: + ui_apply_but_ROW(C, block, but, data); + break; case UI_BTYPE_TAB: ui_apply_but_TAB(C, but, data); break; @@ -7851,6 +7851,9 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent * case UI_BTYPE_LABEL: case UI_BTYPE_IMAGE: case UI_BTYPE_PROGRESS_BAR: + case UI_BTYPE_DATASETROW: + retval = ui_do_but_TOG(C, but, data, event); + break; case UI_BTYPE_NODE_SOCKET: retval = ui_do_but_EXIT(C, but, data, event); break; |