Fix own error - tab scrolling mixed up region/window coords

This commit is contained in:
Campbell Barton 2014-02-21 16:12:53 +11:00
parent a00ebaecce
commit c50b23fa67
Notes: blender-bot 2023-02-14 11:09:44 +01:00
Referenced by issue #38735, Tab mouse scrolling doesn't work if tabs are not at the edge of screen.
1 changed files with 1 additions and 1 deletions

View File

@ -1645,7 +1645,7 @@ int ui_handler_panel_region(bContext *C, const wmEvent *event, ARegion *ar)
/* mouse wheel cycle tabs */
/* first check if the mouse is in the tab region */
if (event->ctrl || (event->x < ((PanelCategoryDyn *)ar->panels_category.first)->rect.xmax)) {
if (event->ctrl || (event->mval[0] < ((PanelCategoryDyn *)ar->panels_category.first)->rect.xmax)) {
const char *category = UI_panel_category_active_get(ar, false);
if (LIKELY(category)) {
PanelCategoryDyn *pc_dyn = UI_panel_category_find(ar, category);