diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-20 22:03:26 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-20 22:03:26 +0300 |
commit | e5cf8cf05242475339cc1b4997d91e8d6a3b1234 (patch) | |
tree | 622f7fb167c7d4e708dbecabb77eb1363ce3400f | |
parent | e673edd388d4045a7d63bc7dc7483904ff5013eb (diff) |
2.5
Two bugfixes:
- area-full (ctrl+up) crashed on area-edge
- view3d view-icon and axes color wrong.
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 16 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 15 |
2 files changed, 22 insertions, 9 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index da03ba13554..4f8efe2f70e 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1229,11 +1229,15 @@ void ed_screen_set(bContext *C, bScreen *sc) 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 @@ void ed_screen_fullarea(bContext *C) is set */ if (fulltype != SCREENAUTOPLAY || (G.flags & G_FILE_AUTOPLAY) == 0) { + ScrArea *old; + sc->full= 0; /* find old area */ @@ -1270,6 +1276,8 @@ void ed_screen_fullarea(bContext *C) } } else { + ScrArea *newa; + oldscreen= CTX_wm_screen(C); /* is there only 1 area? */ diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 1d4b7f2de0b..c10cadb2332 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -364,13 +364,15 @@ static void drawgrid(ARegion *ar, View3D *v3d) 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 @@ static void draw_view_icon(RegionView3D *rv3d) { 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); |