diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-07-25 03:07:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-07-25 03:07:18 +0400 |
commit | f7b90c0f419633e33c4a81969b9e6228cf896b24 (patch) | |
tree | 2a08835e371251e2393beb7e016cef76dc99b09a /source/blender/editors | |
parent | a93619a8c44d432e93a29f01b65505adee77474a (diff) |
- report header buttons were not drawing.
- shift+b in the console would do border zoom (rather then upper case B), fixed by making v2d's border zoom check if the v2d's zoom is locked.
- blender in debug mode registers all operators, useful for testing.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/view2d_ops.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_console/space_console.c | 9 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 8 |
3 files changed, 13 insertions, 14 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index f0745ebfd71..44b7f1d13da 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -464,7 +464,7 @@ void VIEW2D_OT_scroll_up(wmOperatorType *ot) /* ------------------ 'Shared' stuff ------------------------ */ /* check if step-zoom can be applied */ -static short view_zoomstep_ok(bContext *C) +static int view_zoom_poll(bContext *C) { ARegion *ar= CTX_wm_region(C); View2D *v2d; @@ -527,7 +527,7 @@ static void view_zoomstep_apply(bContext *C, wmOperator *op) static int view_zoomin_exec(bContext *C, wmOperator *op) { /* check that there's an active region, as View2D data resides there */ - if (!view_zoomstep_ok(C)) + if (!view_zoom_poll(C)) return OPERATOR_PASS_THROUGH; /* set RNA-Props - zooming in by uniform factor */ @@ -563,7 +563,7 @@ void VIEW2D_OT_zoom_in(wmOperatorType *ot) static int view_zoomout_exec(bContext *C, wmOperator *op) { /* check that there's an active region, as View2D data resides there */ - if (!view_zoomstep_ok(C)) + if (!view_zoom_poll(C)) return OPERATOR_PASS_THROUGH; /* set RNA-Props - zooming in by uniform factor */ @@ -831,6 +831,8 @@ void VIEW2D_OT_zoom(wmOperatorType *ot) ot->invoke= view_zoomdrag_invoke; ot->modal= view_zoomdrag_modal; + ot->poll= view_zoom_poll; + /* operator is repeatable */ // ot->flag= OPTYPE_REGISTER|OPTYPE_BLOCKING; @@ -929,7 +931,7 @@ void VIEW2D_OT_zoom_border(wmOperatorType *ot) ot->exec= view_borderzoom_exec; ot->modal= WM_border_select_modal; - ot->poll= ED_operator_areaactive; + ot->poll= view_zoom_poll; /* rna */ RNA_def_int(ot->srna, "event_type", 0, INT_MIN, INT_MAX, "Event Type", "", INT_MIN, INT_MAX); diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index 763be0392dc..db70eff386f 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -277,6 +277,8 @@ void console_keymap(struct wmWindowManager *wm) #ifndef DISABLE_PYTHON WM_keymap_add_item(keymap, "CONSOLE_OT_exec", RETKEY, KM_PRESS, 0, 0); /* python operator - space_text.py */ + WM_keymap_add_item(keymap, "CONSOLE_OT_exec", PADENTER, KM_PRESS, 0, 0); + //WM_keymap_add_item(keymap, "CONSOLE_OT_autocomplete", TABKEY, KM_PRESS, 0, 0); /* python operator - space_text.py */ WM_keymap_add_item(keymap, "CONSOLE_OT_autocomplete", RETKEY, KM_PRESS, KM_CTRL, 0); /* python operator - space_text.py */ #endif @@ -291,13 +293,8 @@ void console_keymap(struct wmWindowManager *wm) WM_keymap_add_item(keymap, "CONSOLE_OT_report_delete", DELKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "CONSOLE_OT_report_copy", CKEY, KM_PRESS, KM_CTRL, 0); - - - - - RNA_string_set(WM_keymap_add_item(keymap, "CONSOLE_OT_insert", TABKEY, KM_PRESS, 0, 0)->ptr, "text", " "); /* fake tabs */ - WM_keymap_add_item(keymap, "CONSOLE_OT_insert", KM_TEXTINPUT, KM_PRESS, KM_ANY, 0); // last! + WM_keymap_add_item(keymap, "CONSOLE_OT_insert", KM_TEXTINPUT, KM_ANY, KM_ANY, 0); // last! } /****************** header region ******************/ diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 3c80b650cf3..f278b717f10 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -1149,7 +1149,7 @@ void VIEW3D_OT_render_border(wmOperatorType *ot) } /* ********************* Border Zoom operator ****************** */ -static int view3d_border_zoom_exec(bContext *C, wmOperator *op) +static int view3d_zoom_border_exec(bContext *C, wmOperator *op) { ARegion *ar= CTX_wm_region(C); View3D *v3d = CTX_wm_view3d(C); @@ -1285,7 +1285,7 @@ static int view3d_border_zoom_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int view3d_border_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int view3d_zoom_border_invoke(bContext *C, wmOperator *op, wmEvent *event) { RegionView3D *rv3d= CTX_wm_region_view3d(C); @@ -1305,8 +1305,8 @@ void VIEW3D_OT_zoom_border(wmOperatorType *ot) ot->idname= "VIEW3D_OT_zoom_border"; /* api callbacks */ - ot->invoke= view3d_border_zoom_invoke; - ot->exec= view3d_border_zoom_exec; + ot->invoke= view3d_zoom_border_invoke; + ot->exec= view3d_zoom_border_exec; ot->modal= WM_border_select_modal; ot->poll= ED_operator_view3d_active; |