diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2009-01-01 23:08:57 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2009-01-01 23:08:57 +0300 |
commit | 0f666dc53ee997502db2a97be96de80a88dacf6b (patch) | |
tree | 433c6aebcea8e28b59f8d5ee71f17ddee826b1a6 /source | |
parent | c2b222d7bbd0689e7b461720abdbd240bbf06b5b (diff) |
2.5 / Nodes
* zoom in/out added also as menu entry
* view all operator is now only executed, not invoked.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_node/node_header.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_state.c | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c index 26abfe0b789..dfe155b57dd 100644 --- a/source/blender/editors/space_node/node_header.c +++ b/source/blender/editors/space_node/node_header.c @@ -591,12 +591,14 @@ static void do_node_viewmenu(bContext *C, void *arg, int event) ScrArea *sa= CTX_wm_area(C); switch(event) { - /* cases 1 and 2 are now handled automagically by View2D code */ case 1: /* Zoom in */ + WM_operator_name_call(C, "View2D_OT_view_zoomin", WM_OP_EXEC_REGION_WIN, NULL); + break; case 2: /* View all */ + WM_operator_name_call(C, "View2D_OT_view_zoomout", WM_OP_EXEC_REGION_WIN, NULL); break; case 3: /* View all */ - WM_operator_name_call(C, "NODE_OT_fit_all", WM_OP_INVOKE_REGION_WIN, NULL); + WM_operator_name_call(C, "NODE_OT_fit_all", WM_OP_EXEC_REGION_WIN, NULL); break; case 4: /* Grease Pencil */ // XXX add_blockhandler(sa, NODES_HANDLER_GREASEPENCIL, UI_PNL_UNSTOW); diff --git a/source/blender/editors/space_node/node_state.c b/source/blender/editors/space_node/node_state.c index 088df34a05f..cda25c6798d 100644 --- a/source/blender/editors/space_node/node_state.c +++ b/source/blender/editors/space_node/node_state.c @@ -203,11 +203,6 @@ static int node_fit_all_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int node_fit_all_invoke(bContext *C, wmOperator *op, wmEvent *event) -{ - return node_fit_all_exec(C, op); -} - void NODE_OT_fit_all(wmOperatorType *ot) { /* identifiers */ @@ -215,6 +210,6 @@ void NODE_OT_fit_all(wmOperatorType *ot) ot->idname= "NODE_OT_fit_all"; /* api callbacks */ - ot->invoke= node_fit_all_invoke; + ot->exec= node_fit_all_exec; ot->poll= ED_operator_node_active; }
\ No newline at end of file |