diff options
author | William Reynish <william@reynish.com> | 2009-11-24 14:40:35 +0300 |
---|---|---|
committer | William Reynish <william@reynish.com> | 2009-11-24 14:40:35 +0300 |
commit | 397b52bdc7b85831ee6b706133f76ffea83f6d59 (patch) | |
tree | 2678a87f5935e3aec8bd9b7a870107b84e46b1cb | |
parent | 96b6f32c54652f80c3736e4d1664e87f26648054 (diff) |
Removed split region operator. This was only for tests, and was not recoverable.
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 54 |
1 files changed, 1 insertions, 53 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index ccc4deddb24..4712d1c5533 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -1994,52 +1994,6 @@ static void SCREEN_OT_redo_last(wmOperatorType *ot) ot->poll= ED_operator_screenactive; } -/* ************** region split operator ***************************** */ - -/* insert a region in the area region list */ -static int region_split_exec(bContext *C, wmOperator *op) -{ - ARegion *ar= CTX_wm_region(C); - - if(ar->regiontype==RGN_TYPE_HEADER) - BKE_report(op->reports, RPT_ERROR, "Cannot split header"); - else if(ar->alignment==RGN_ALIGN_QSPLIT) - BKE_report(op->reports, RPT_ERROR, "Cannot split further"); - else { - ScrArea *sa= CTX_wm_area(C); - ARegion *newar= BKE_area_region_copy(sa->type, ar); - int dir= RNA_enum_get(op->ptr, "type"); - - BLI_insertlinkafter(&sa->regionbase, ar, newar); - - newar->alignment= ar->alignment; - - if(dir=='h') - ar->alignment= RGN_ALIGN_HSPLIT; - else - ar->alignment= RGN_ALIGN_VSPLIT; - - WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); - } - - return OPERATOR_FINISHED; -} - -static void SCREEN_OT_region_split(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Split Region"; - ot->description= "Split area by directional position."; - ot->idname= "SCREEN_OT_region_split"; - - /* api callbacks */ - ot->invoke= WM_menu_invoke; - ot->exec= region_split_exec; - ot->poll= ED_operator_areaactive; - - RNA_def_enum(ot->srna, "type", prop_direction_items, 'h', "Direction", ""); -} - /* ************** region four-split operator ***************************** */ /* insert a region in the area region list */ @@ -3592,7 +3546,6 @@ void ED_operatortypes_screen(void) WM_operatortype_append(SCREEN_OT_area_join); WM_operatortype_append(SCREEN_OT_area_dupli); WM_operatortype_append(SCREEN_OT_area_swap); - WM_operatortype_append(SCREEN_OT_region_split); WM_operatortype_append(SCREEN_OT_region_foursplit); WM_operatortype_append(SCREEN_OT_region_flip); WM_operatortype_append(SCREEN_OT_region_scale); @@ -3692,16 +3645,11 @@ void ED_keymap_screen(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "SCREEN_OT_screencast", F3KEY, KM_PRESS, KM_ALT, 0); /* tests */ - WM_keymap_add_item(keymap, "SCREEN_OT_region_split", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); - WM_keymap_add_item(keymap, "SCREEN_OT_region_foursplit", SKEY, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0); - + WM_keymap_add_item(keymap, "SCREEN_OT_region_foursplit", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); WM_keymap_verify_item(keymap, "SCREEN_OT_repeat_history", F3KEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "SCREEN_OT_repeat_last", RKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "SCREEN_OT_region_flip", F5KEY, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "SCREEN_OT_redo_last", F6KEY, KM_PRESS, 0, 0); - WM_keymap_verify_item(keymap, "WM_OT_reload_scripts", F8KEY, KM_PRESS, 0, 0); /* files */ |