Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r--source/blender/editors/interface/interface_handlers.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index c277ca2e36b..e0b64dcd4d6 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -9398,7 +9398,7 @@ static int ui_list_activate_hovered_row(bContext *C,
}
}
- const int *mouse_xy = ISTWEAK(event->type) ? event->prev_click_xy : event->xy;
+ const int *mouse_xy = (event->val == KM_CLICK_DRAG) ? event->prev_click_xy : event->xy;
uiBut *listrow = ui_list_row_find_mouse_over(region, mouse_xy);
if (listrow) {
wmOperatorType *custom_activate_optype = ui_list->dyn_data->custom_activate_optype;
@@ -9425,7 +9425,7 @@ static bool ui_list_is_hovering_draggable_but(bContext *C,
const wmEvent *event)
{
/* On a tweak event, uses the coordinates from where tweaking was started. */
- const int *mouse_xy = ISTWEAK(event->type) ? event->prev_click_xy : event->xy;
+ const int *mouse_xy = (event->val == KM_CLICK_DRAG) ? event->prev_click_xy : event->xy;
const uiBut *hovered_but = ui_but_find_mouse_over_ex(region, mouse_xy, false, NULL, NULL);
if (list->dyn_data->custom_drag_optype) {
@@ -9442,7 +9442,7 @@ static int ui_list_handle_click_drag(bContext *C,
ARegion *region,
const wmEvent *event)
{
- if (!ELEM(event->type, LEFTMOUSE, EVT_TWEAK_L)) {
+ if (event->type != LEFTMOUSE) {
return WM_HANDLER_CONTINUE;
}
@@ -9452,7 +9452,7 @@ static int ui_list_handle_click_drag(bContext *C,
bool activate = false;
bool activate_dragging = false;
- if (event->type == EVT_TWEAK_L) {
+ if (event->val == KM_CLICK_DRAG) {
if (is_draggable) {
activate_dragging = true;
activate = true;
@@ -9462,7 +9462,7 @@ static int ui_list_handle_click_drag(bContext *C,
* regular events (including mouse presses to start dragging) and this part only kicks in if it
* hasn't handled the release event. Note that if there's no overlaid button, the row selects
* on the press event already via regular #UI_BTYPE_LISTROW handling. */
- else if ((event->type == LEFTMOUSE) && (event->val == KM_CLICK)) {
+ else if (event->val == KM_CLICK) {
activate = true;
}
@@ -9549,7 +9549,7 @@ static int ui_handle_list_event(bContext *C, const wmEvent *event, ARegion *regi
}
}
- if (ELEM(event->type, LEFTMOUSE, EVT_TWEAK_L)) {
+ if (event->type == LEFTMOUSE) {
retval = ui_list_handle_click_drag(C, ui_list, region, event);
}
else if (val == KM_PRESS) {