Fix T47256: Progress bar doesn't update w/ mouse-over
This commit is contained in:
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
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue