Fix #30076: RenderLayer area blocks mouse scrolling

In fact all list templates used to block mouse scroll. It's because mouse
scrolls list's scroll bar. But mouse scroll also used to be "eaten" even
if there's no scroll in list template.
This commit makes scroll even be ignored by list templates if there's
no scroll bar on list.
This commit is contained in:
2012-02-07 16:53:14 +00:00
parent a7e6e5354b
commit b49d257209

View File

@@ -5859,15 +5859,17 @@ static int ui_handle_list_event(bContext *C, wmEvent *event, ARegion *ar)
retval= WM_UI_HANDLER_BREAK;
}
else if(ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE)) {
/* list template will clamp */
if(event->type == WHEELUPMOUSE)
pa->list_scroll--;
else
pa->list_scroll++;
if(pa->list_last_len > pa->list_size) {
/* list template will clamp */
if(event->type == WHEELUPMOUSE)
pa->list_scroll--;
else
pa->list_scroll++;
ED_region_tag_redraw(ar);
ED_region_tag_redraw(ar);
retval= WM_UI_HANDLER_BREAK;
retval= WM_UI_HANDLER_BREAK;
}
}
}