Fix #127502: Popup resizes few times after closing a layout panel
Avoid truncation errors causing unneccessary resizing by passing floats to UI_block_translate. That function translates block and button rects which are floats. Pull Request: https://projects.blender.org/blender/blender/pulls/127505
This commit is contained in:
committed by
Harley Acheson
parent
1241e3a5e4
commit
033f18b5e9
@@ -997,7 +997,7 @@ void UI_block_direction_set(uiBlock *block, char direction);
|
||||
*/
|
||||
void UI_block_flag_enable(uiBlock *block, int flag);
|
||||
void UI_block_flag_disable(uiBlock *block, int flag);
|
||||
void UI_block_translate(uiBlock *block, int x, int y);
|
||||
void UI_block_translate(uiBlock *block, float x, float y);
|
||||
|
||||
int UI_but_return_value_get(uiBut *but);
|
||||
|
||||
|
||||
@@ -346,7 +346,7 @@ void ui_region_winrct_get_no_margin(const ARegion *region, rcti *r_rect)
|
||||
|
||||
/* ******************* block calc ************************* */
|
||||
|
||||
void UI_block_translate(uiBlock *block, int x, int y)
|
||||
void UI_block_translate(uiBlock *block, float x, float y)
|
||||
{
|
||||
LISTBASE_FOREACH (uiBut *, but, &block->buttons) {
|
||||
BLI_rctf_translate(&but->rect, x, y);
|
||||
|
||||
Reference in New Issue
Block a user