[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37203] trunk/blender/source/blender/ editors/screen/area.c: workaround for supremely annoying UI glitch where you could accidentally hide the file selector header by accident .

Campbell Barton ideasman42 at gmail.com
Sun Jun 5 11:22:14 CEST 2011


Revision: 37203
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37203
Author:   campbellbarton
Date:     2011-06-05 09:22:14 +0000 (Sun, 05 Jun 2011)
Log Message:
-----------
workaround for supremely annoying UI glitch where you could accidentally hide the file selector header by accident.
using the logic - that a header taking up the full screen-area height will not have an action-zone added for resizing.

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	2011-06-05 09:00:36 UTC (rev 37202)
+++ trunk/blender/source/blender/editors/screen/area.c	2011-06-05 09:22:14 UTC (rev 37203)
@@ -815,9 +815,19 @@
 			ar->winrct.xmax= ar->winrct.xmin;
 	}
 	/* in end, add azones, where appropriate */
-	region_azone_add(sa, ar, alignment);
+	if(ar->regiontype == RGN_TYPE_HEADER && ar->winy + 6 > sa->winy) {
+		/* The logic for this is: when the header takes up the full area,
+		 * disallow hiding it to view the main window.
+		 *
+		 * Without this, uou can drag down the file selectors header and hide it
+		 * by accident very easily (highly annoying!), the value 6 is arbitrary
+		 * but accounts for small common rounding problems when scaling the UI,
+		 * must be minimum '4' */
+	}
+	else {
+		region_azone_add(sa, ar, alignment);
+	}
 
-
 	region_rect_recursive(sa, ar->next, remainder, quad);
 }
 




More information about the Bf-blender-cvs mailing list