2.5
Some small fixes: - handler operator exec gave too quick a warning for invalid area (set area context to NULL is OK :) - 4-split 3D view with clip option didn't reset clip when 4-split was disabled - creating a new 3d view didn't initialize buttons region correct.
This commit is contained in:
@@ -1627,6 +1627,7 @@ static int region_foursplit_exec(bContext *C, wmOperator *op)
|
||||
if(sa->spacetype==SPACE_VIEW3D) {
|
||||
RegionView3D *rv3d= ar->regiondata;
|
||||
rv3d->viewlock= 0;
|
||||
rv3d->rflag &= ~RV3D_CLIPPING;
|
||||
}
|
||||
|
||||
for(ar= sa->regionbase.first; ar; ar= arn) {
|
||||
|
||||
@@ -138,7 +138,8 @@ static SpaceLink *view3d_new(const bContext *C)
|
||||
|
||||
BLI_addtail(&v3d->regionbase, ar);
|
||||
ar->regiontype= RGN_TYPE_UI;
|
||||
ar->alignment= RGN_OVERLAP_LEFT;
|
||||
ar->alignment= RGN_ALIGN_LEFT;
|
||||
ar->flag = RGN_FLAG_HIDDEN;
|
||||
|
||||
/* main area */
|
||||
ar= MEM_callocN(sizeof(ARegion), "main area for view3d");
|
||||
|
||||
@@ -1515,6 +1515,7 @@ static int view3d_properties(bContext *C, wmOperator *op)
|
||||
|
||||
if(ar) {
|
||||
ar->flag ^= RGN_FLAG_HIDDEN;
|
||||
ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
|
||||
|
||||
ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
|
||||
ED_area_tag_redraw(sa);
|
||||
|
||||
@@ -468,22 +468,26 @@ static void wm_handler_op_context(bContext *C, wmEventHandler *handler)
|
||||
bScreen *screen= CTX_wm_screen(C);
|
||||
|
||||
if(screen && handler->op) {
|
||||
ScrArea *sa;
|
||||
|
||||
for(sa= screen->areabase.first; sa; sa= sa->next)
|
||||
if(sa==handler->op_area)
|
||||
break;
|
||||
if(sa==NULL)
|
||||
printf("internal error: handler (%s) has invalid area\n", handler->op->type->idname);
|
||||
if(handler->op_area==NULL)
|
||||
CTX_wm_area_set(C, NULL);
|
||||
else {
|
||||
ARegion *ar;
|
||||
CTX_wm_area_set(C, sa);
|
||||
for(ar= sa->regionbase.first; ar; ar= ar->next)
|
||||
if(ar==handler->op_region)
|
||||
ScrArea *sa;
|
||||
|
||||
for(sa= screen->areabase.first; sa; sa= sa->next)
|
||||
if(sa==handler->op_area)
|
||||
break;
|
||||
/* XXX no warning print here, after full-area and back regions are remade */
|
||||
if(ar)
|
||||
CTX_wm_region_set(C, ar);
|
||||
if(sa==NULL)
|
||||
printf("internal error: handler (%s) has invalid area\n", handler->op->type->idname);
|
||||
else {
|
||||
ARegion *ar;
|
||||
CTX_wm_area_set(C, sa);
|
||||
for(ar= sa->regionbase.first; ar; ar= ar->next)
|
||||
if(ar==handler->op_region)
|
||||
break;
|
||||
/* XXX no warning print here, after full-area and back regions are remade */
|
||||
if(ar)
|
||||
CTX_wm_region_set(C, ar);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user