Fix T47256: Progress bar doesn't update w/ mouse-over

This commit is contained in:
Campbell Barton 2016-02-02 14:06:06 +11:00
parent 7c04c3c960
commit 3822a9c01a
Notes: blender-bot 2024-03-25 12:30:38 +01:00
Referenced by issue #47256, New progress bar stops working properly when moving mouse over it
2 changed files with 9 additions and 1 deletions

View File

@ -735,8 +735,15 @@ static bool ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBu
/* copy hardmin for list rows to prevent 'sticking' highlight to mouse position
* when scrolling without moving mouse (see [#28432]) */
if (ELEM(oldbut->type, UI_BTYPE_ROW, UI_BTYPE_LISTROW))
if (ELEM(oldbut->type, UI_BTYPE_ROW, UI_BTYPE_LISTROW)) {
oldbut->hardmax = but->hardmax;
}
/* Selectively copy a1, a2 since their use differs across all button types
* (and we'll probably split these out later) */
if (ELEM(oldbut->type, UI_BTYPE_PROGRESS_BAR)) {
oldbut->a1 = but->a1;
}
ui_but_update_linklines(block, oldbut, but);

View File

@ -225,6 +225,7 @@ struct uiBut {
* (type == UI_BTYPE_SCROLL) Use as scroll size.
* (type == UI_BTYPE_SEARCH_MENU) Use as number or rows.
* (type == UI_BTYPE_COLOR) Use as indication of color palette
* (type == UI_BTYPE_PROGRESS_BAR) Use to store progress (0..1).
*/
float a1;