[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18593] branches/blender2.5/blender/source /blender/editors: 2.5

Ton Roosendaal ton at blender.org
Tue Jan 20 20:03:27 CET 2009


Revision: 18593
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18593
Author:   ton
Date:     2009-01-20 20:03:26 +0100 (Tue, 20 Jan 2009)

Log Message:
-----------
2.5

Two bugfixes:
- area-full (ctrl+up) crashed on area-edge
- view3d view-icon and axes color wrong.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/screen/screen_edit.c
    branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_draw.c

Modified: branches/blender2.5/blender/source/blender/editors/screen/screen_edit.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/screen/screen_edit.c	2009-01-20 19:00:00 UTC (rev 18592)
+++ branches/blender2.5/blender/source/blender/editors/screen/screen_edit.c	2009-01-20 19:03:26 UTC (rev 18593)
@@ -1229,11 +1229,15 @@
 void ed_screen_fullarea(bContext *C)
 {
 	bScreen *sc, *oldscreen;
-	ScrArea *newa, *old;
-	short fulltype;
+	ScrArea *sa= CTX_wm_area(C);
 	
-	if(CTX_wm_area(C)->full) {
-		sc= CTX_wm_area(C)->full;		/* the old screen to restore */
+	if(sa==NULL) {
+		return;
+	}
+	else if(sa->full) {
+		short fulltype;
+		
+		sc= sa->full;		/* the old screen to restore */
 		oldscreen= CTX_wm_screen(C);	/* the one disappearing */
 		
 		fulltype = sc->full;
@@ -1242,6 +1246,8 @@
 		   is set */
 		
 		if (fulltype != SCREENAUTOPLAY || (G.flags & G_FILE_AUTOPLAY) == 0) {
+			ScrArea *old;
+			
 			sc->full= 0;
 			
 			/* find old area */
@@ -1270,6 +1276,8 @@
 		}
 	}
 	else {
+		ScrArea *newa;
+		
 		oldscreen= CTX_wm_screen(C);
 
 		/* is there only 1 area? */

Modified: branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_draw.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_draw.c	2009-01-20 19:00:00 UTC (rev 18592)
+++ branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_draw.c	2009-01-20 19:03:26 UTC (rev 18593)
@@ -364,13 +364,15 @@
 	setlinestyle(0);
 	
 	/* center cross */
-	if(rv3d->view==3) make_axis_color(col, col2, 'y');
+	if( ELEM(rv3d->view, V3D_VIEW_RIGHT, V3D_VIEW_LEFT)) 
+		make_axis_color(col, col2, 'y');
 	else make_axis_color(col, col2, 'x');
 	glColor3ubv((GLubyte *)col2);
 	
 	fdrawline(0.0,  y,  (float)ar->winx,  y); 
 	
-	if(rv3d->view==7) make_axis_color(col, col2, 'y');
+	if( ELEM(rv3d->view, V3D_VIEW_TOP, V3D_VIEW_BOTTOM)) 
+		make_axis_color(col, col2, 'y');
 	else make_axis_color(col, col2, 'z');
 	glColor3ubv((GLubyte *)col2);
 
@@ -632,9 +634,12 @@
 {
 	BIFIconID icon;
 	
-	if(rv3d->view==7) icon= ICON_AXIS_TOP;
-	else if(rv3d->view==1) icon= ICON_AXIS_FRONT;
-	else if(rv3d->view==3) icon= ICON_AXIS_SIDE;
+	if( ELEM(rv3d->view, V3D_VIEW_TOP, V3D_VIEW_BOTTOM)) 
+		icon= ICON_AXIS_TOP;
+	else if( ELEM(rv3d->view, V3D_VIEW_FRONT, V3D_VIEW_BACK)) 
+		icon= ICON_AXIS_FRONT;
+	else if( ELEM(rv3d->view, V3D_VIEW_RIGHT, V3D_VIEW_LEFT)) 
+		icon= ICON_AXIS_SIDE;
 	else return ;
 	
 	glEnable(GL_BLEND);





More information about the Bf-blender-cvs mailing list