diff options
author | Ton Roosendaal <ton@blender.org> | 2011-03-23 19:36:41 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-03-23 19:36:41 +0300 |
commit | 7cef4ea008b10a879c0731b39e431594602af41d (patch) | |
tree | 7eecaab317e855ff7628964bbdb64010370046a6 /source/blender/editors/screen | |
parent | a94e9c5955876e7dc3e1fb6c1aef6568b5b1f1e7 (diff) |
IRC bugreport:
Splitting/joining editors (areas) was possible in full-screen mode.
That's not possible, crashes on going back to previous.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 5236d67fa55..b52937aa309 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -108,6 +108,17 @@ int ED_operator_screenactive(bContext *C) return 1; } +static int screen_active_editable(bContext *C) +{ + if(ED_operator_screenactive(C)) { + /* no full window splitting allowed */ + if(CTX_wm_screen(C)->full != SCREENNORMAL) + return 0; + return 1; + } + return 0; +} + /* when mouse is over area-edge */ int ED_operator_screen_mainwinactive(bContext *C) { @@ -1263,6 +1274,10 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event) sAreaSplitData *sd; int dir; + /* no full window splitting allowed */ + if(CTX_wm_screen(C)->full != SCREENNORMAL) + return OPERATOR_CANCELLED; + if(event->type==EVT_ACTIONZONE_AREA) { sActionzoneData *sad= event->customdata; @@ -1270,7 +1285,6 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_PASS_THROUGH; } - /* verify *sad itself */ if(sad==NULL || sad->sa1==NULL || sad->az==NULL) return OPERATOR_PASS_THROUGH; @@ -1299,10 +1313,6 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event) ScrEdge *actedge; int x, y; - /* no full window splitting allowed */ - if(CTX_wm_area(C) && CTX_wm_area(C)->full) - return OPERATOR_CANCELLED; - /* retrieve initial mouse coord, so we can find the active edge */ if(RNA_property_is_set(op->ptr, "mouse_x")) x= RNA_int_get(op->ptr, "mouse_x"); @@ -1471,7 +1481,7 @@ static void SCREEN_OT_area_split(wmOperatorType *ot) ot->invoke= area_split_invoke; ot->modal= area_split_modal; - ot->poll= ED_operator_screenactive; + ot->poll= screen_active_editable; ot->flag= OPTYPE_BLOCKING; /* rna */ @@ -2210,7 +2220,7 @@ static void SCREEN_OT_area_join(wmOperatorType *ot) ot->exec= area_join_exec; ot->invoke= area_join_invoke; ot->modal= area_join_modal; - ot->poll= ED_operator_screenactive; + ot->poll= screen_active_editable; ot->flag= OPTYPE_BLOCKING; |