Fix tool properties region drawing even if the toolbar is hidden.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 22 Jan 2014 15:35:11 +0000 (16:35 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 22 Jan 2014 15:40:11 +0000 (16:40 +0100)
This would show as a line on the side of the 3D view with high DPI / retina,
not easy to notice.

source/blender/editors/screen/area.c

index ef3cbeb2acc187c59d967d779d3dbf1697717328..2c69150587776b513be4da14d88e90e4cba85e1e 100644 (file)
@@ -1184,7 +1184,12 @@ static void area_calc_totrct(ScrArea *sa, int sizex, int sizey)
 /* used for area initialize below */
 static void region_subwindow(wmWindow *win, ARegion *ar)
 {
-       if (ar->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)) {
+       bool hidden = (ar->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)) != 0;
+
+       if ((ar->alignment & RGN_SPLIT_PREV) && ar->prev)
+               hidden = hidden || (ar->prev->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL));
+
+       if (hidden) {
                if (ar->swinid)
                        wm_subwindow_close(win, ar->swinid);
                ar->swinid = 0;