[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53062] trunk/blender/source/blender/ editors/screen/area.c: Bug fix 33563
Ton Roosendaal
ton at blender.org
Sun Dec 16 15:19:30 CET 2012
Revision: 53062
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53062
Author: ton
Date: 2012-12-16 14:19:29 +0000 (Sun, 16 Dec 2012)
Log Message:
-----------
Bug fix 33563
Region sizex/sizey should store the actual used sizes, for hide/reveal.
Didn't happen correctly, resulting in opening button regions of size 1.
Modified Paths:
--------------
trunk/blender/source/blender/editors/screen/area.c
Modified: trunk/blender/source/blender/editors/screen/area.c
===================================================================
--- trunk/blender/source/blender/editors/screen/area.c 2012-12-16 14:17:15 UTC (rev 53061)
+++ trunk/blender/source/blender/editors/screen/area.c 2012-12-16 14:19:29 UTC (rev 53062)
@@ -944,7 +944,7 @@
alignment = RGN_ALIGN_NONE;
/* prefsize, for header we stick to exception */
- prefsizex = ar->sizex ? ar->sizex : UI_DPI_FAC * ar->type->prefsizex;
+ prefsizex = ar->sizex > 1 ? ar->sizex : UI_DPI_FAC * ar->type->prefsizex;
if (ar->regiontype == RGN_TYPE_HEADER) {
prefsizey = ED_area_headersize();
}
@@ -952,7 +952,7 @@
prefsizey = UI_UNIT_Y * 2 + (UI_UNIT_Y / 2);
}
else {
- prefsizey = ar->sizey ? ar->sizey : UI_DPI_FAC * ar->type->prefsizey;
+ prefsizey = ar->sizey > 1 ? ar->sizey : UI_DPI_FAC * ar->type->prefsizey;
}
@@ -1091,6 +1091,10 @@
ar->winx = BLI_rcti_size_x(&ar->winrct) + 1;
ar->winy = BLI_rcti_size_y(&ar->winrct) + 1;
+ /* if region opened normally, we store this for hide/reveal usage */
+ if (ar->winx > 1) ar->sizex = ar->winx;
+ if (ar->winy > 1) ar->sizey = ar->winy;
+
/* exception for multiple aligned overlapping regions on same spot */
if (ar->overlap)
region_overlap_fix(ar);
@@ -1298,6 +1302,8 @@
ar->flag ^= RGN_FLAG_HIDDEN;
+ printf("%d\n", ar->winx);
+
if (do_fade && ar->overlap) {
/* starts a timer, and in end calls the stuff below itself (region_sblend_invoke()) */
region_blend_start(C, sa, ar);
More information about the Bf-blender-cvs
mailing list