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:
Sergey Sharybin
2011-09-30 15:42:04 +00:00
parent f3ae228c9d
commit 2bb59bc273

View File

@@ -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);