2.5: fix for closed panels not resizing properly.
This commit is contained in:
@@ -268,14 +268,19 @@ void uiEndPanel(uiBlock *block, int width, int height)
|
||||
pa->sizex= width;
|
||||
pa->sizey= height;
|
||||
}
|
||||
else if(!(width == 0 || height == 0)) {
|
||||
if(pa->sizex != width || pa->sizey != height) {
|
||||
else {
|
||||
/* check if we need to do an animation */
|
||||
if(!ELEM(width, 0, pa->sizex) || !ELEM(height, 0, pa->sizey)) {
|
||||
pa->runtime_flag |= PNL_ANIM_ALIGN;
|
||||
pa->ofsy += pa->sizey-height;
|
||||
if(height != 0)
|
||||
pa->ofsy += pa->sizey-height;
|
||||
}
|
||||
|
||||
pa->sizex= width;
|
||||
pa->sizey= height;
|
||||
/* update width/height if non-zero */
|
||||
if(width != 0)
|
||||
pa->sizex= width;
|
||||
if(height != 0)
|
||||
pa->sizey= height;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user