Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-16 02:58:34 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-16 02:58:34 +0400
commitacb07bf0139f8071668ffab915ba0704adabc7a6 (patch)
tree28ea23e4ff32b208ea2317c10edb8fa4749c9fa8 /source/blender/editors/interface/interface_panel.c
parent7c2fb421957da7d2e167283cd6c95a1a7a26c7f7 (diff)
2.5: fix for closed panels not resizing properly.
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r--source/blender/editors/interface/interface_panel.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 363717c29d3..377861ae0d7 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -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;
}
}