Fix #28432: Scrolling lists respond incorrectly if mouse is not moved
Copy hardmin for LISTROW and ROW buttons when updating button from old block due to list item index is stored in this value.
This commit is contained in:
@@ -678,6 +678,11 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut
|
||||
SWAP(void *, oldbut->func_argN, but->func_argN)
|
||||
}
|
||||
|
||||
/* copy hardmin for list rows to prevent 'sticking' highlight to mouse position
|
||||
when scrolling without moving mouse (see [#28432]) */
|
||||
if(ELEM(oldbut->type, ROW, LISTROW))
|
||||
oldbut->hardmax= but->hardmax;
|
||||
|
||||
ui_but_update_linklines(block, oldbut, but);
|
||||
|
||||
BLI_remlink(&block->buttons, but);
|
||||
|
Reference in New Issue
Block a user