2.5
authorTon Roosendaal <ton@blender.org>
Sun, 16 Aug 2009 13:51:33 +0000 (13:51 +0000)
committerTon Roosendaal <ton@blender.org>
Sun, 16 Aug 2009 13:51:33 +0000 (13:51 +0000)
Small fix: region-zones (currently triangles) overlapped when closed in
cases. Happened for 3d window toolbar for example.

source/blender/editors/screen/area.c

index 96ad9039dc1044341893ef3eea3dc402f9dbe820..296c38fa51a4ee0bba652e0ed04d15a8ff523724 100644 (file)
@@ -499,7 +499,7 @@ static void region_azone_initialize(ScrArea *sa, ARegion *ar, char edge)
        /* if more azones on 1 spot, set offset */
        for(azt= sa->actionzones.first; azt; azt= azt->next) {
                if(az!=azt) {
        /* if more azones on 1 spot, set offset */
        for(azt= sa->actionzones.first; azt; azt= azt->next) {
                if(az!=azt) {
-                       if(az->x1==azt->x1 && az->y1==azt->y1) {
+                       if( ABS(az->x1-azt->x1) < 2 && ABS(az->y1-azt->y1) < 2) {
                                if(edge=='t' || edge=='b') {
                                        az->x1+= AZONESPOT;
                                        az->x2+= AZONESPOT;
                                if(edge=='t' || edge=='b') {
                                        az->x1+= AZONESPOT;
                                        az->x2+= AZONESPOT;