diff options
author | Michael Fox <mfoxdogg@gmail.com> | 2011-12-20 04:46:55 +0400 |
---|---|---|
committer | Michael Fox <mfoxdogg@gmail.com> | 2011-12-20 04:46:55 +0400 |
commit | 84a58fd7e9af987d3fa6fccb7acb2e019ca680e1 (patch) | |
tree | 8d6af6e8c9c7acff317e4ab6cee9d99d2825806c /source | |
parent | 71ce197bbb09af00980f6efc4891dc2a7ffda36b (diff) |
Patch #27085, Restore old 2.49 TAB behaviour for window splitting, by Andre Oliveira
Now this patch only applies to RMB window splitting not the click and drag as that would cause confusion and big mess
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 007a8f7e4d7..1c34df5393a 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -1293,6 +1293,7 @@ static void area_split_exit(bContext *C, wmOperator *op) op->customdata = NULL; } + WM_cursor_restore(CTX_wm_window(C)); WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); /* this makes sure aligned edges will result in aligned grabbing */ @@ -1491,6 +1492,37 @@ static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event) } } break; + + case MIDDLEMOUSE: + case TABKEY: + if (sd->previewmode==0){ + } + else{ + dir = RNA_enum_get(op->ptr, "direction"); + + if(event->val==KM_PRESS){ + if (sd->sarea){ + sd->sarea->flag &= ~(AREA_FLAG_DRAWSPLIT_H|AREA_FLAG_DRAWSPLIT_V); + ED_area_tag_redraw(sd->sarea); + + if (dir=='v'){ + RNA_enum_set(op->ptr, "direction", 'h'); + sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_H; + + WM_cursor_set(CTX_wm_window(C),CURSOR_X_MOVE); + } + else{ + RNA_enum_set(op->ptr, "direction", 'v'); + sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_V; + + WM_cursor_set(CTX_wm_window(C),CURSOR_Y_MOVE); + } + } + } + } + + break; + case RIGHTMOUSE: /* cancel operation */ case ESCKEY: return area_split_cancel(C, op); |