Fix T83346: Scrolling doesn't work with mouse over panel header

Just a misplaced assignment to the return value from the panel handler
in rB600fb28b6295.
This commit is contained in:
Hans Goudey 2020-12-03 23:37:16 -06:00
parent a88e6261db
commit 2bd0263fbf
Notes: blender-bot 2023-02-14 06:45:14 +01:00
Referenced by issue #83346, Can't scroll using the middle mouse button/scroll wheel on the panel headers
1 changed files with 2 additions and 1 deletions

View File

@ -2452,11 +2452,12 @@ int ui_handler_panel_region(bContext *C,
if (mouse_state == PANEL_MOUSE_INSIDE_HEADER) {
/* All mouse clicks inside panel headers should return in break. */
retval = WM_UI_HANDLER_BREAK;
if (ELEM(event->type, EVT_RETKEY, EVT_PADENTER, LEFTMOUSE)) {
retval = WM_UI_HANDLER_BREAK;
ui_handle_panel_header(C, block, mx, event->type, event->ctrl, event->shift);
}
else if (event->type == RIGHTMOUSE) {
retval = WM_UI_HANDLER_BREAK;
ui_popup_context_menu_for_panel(C, region, block->panel);
}
break;