diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-31 03:08:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-31 03:08:53 +0400 |
commit | 7267221715d8431bd1aaaaa3ace4f8c0ce151627 (patch) | |
tree | 65f85d299db27f35ec67330e58864f1dcf088687 /source/blender/editors/space_node | |
parent | bced18155ffc525dc513d097245fe3954acbb900 (diff) |
remove return argument from wmOperatorType->cancel, was only ever returning OPERATOR_CANCELLED.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_relationships.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_view.c | 7 |
3 files changed, 7 insertions, 14 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 1d93fe65c09..f58bc83e5d2 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -859,7 +859,7 @@ static void node_resize_init(bContext *C, wmOperator *op, const wmEvent *UNUSED( WM_event_add_modal_handler(C, op); } -static void node_resize_exit(bContext *C, wmOperator *op, int UNUSED(cancel)) +static void node_resize_exit(bContext *C, wmOperator *op, bool UNUSED(cancel)) { WM_cursor_modal_restore(CTX_wm_window(C)); @@ -961,7 +961,7 @@ static int node_resize_modal(bContext *C, wmOperator *op, const wmEvent *event) case MIDDLEMOUSE: case RIGHTMOUSE: - node_resize_exit(C, op, 0); + node_resize_exit(C, op, false); ED_node_post_apply_transform(C, snode->edittree); return OPERATOR_FINISHED; @@ -990,11 +990,9 @@ static int node_resize_invoke(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH; } -static int node_resize_cancel(bContext *C, wmOperator *op) +static void node_resize_cancel(bContext *C, wmOperator *op) { - node_resize_exit(C, op, 1); - - return OPERATOR_CANCELLED; + node_resize_exit(C, op, true); } void NODE_OT_resize(wmOperatorType *ot) diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index 4b5cc9e42b6..8c4050766af 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -669,7 +669,7 @@ static int node_link_invoke(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH; } -static int node_link_cancel(bContext *C, wmOperator *op) +static void node_link_cancel(bContext *C, wmOperator *op) { SpaceNode *snode = CTX_wm_space_node(C); bNodeLinkDrag *nldrag = op->customdata; @@ -678,8 +678,6 @@ static int node_link_cancel(bContext *C, wmOperator *op) BLI_freelistN(&nldrag->links); MEM_freeN(nldrag); - - return OPERATOR_CANCELLED; } void NODE_OT_link(wmOperatorType *ot) diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c index f889a8ec97b..5ea6f8b0caf 100644 --- a/source/blender/editors/space_node/node_view.c +++ b/source/blender/editors/space_node/node_view.c @@ -273,12 +273,10 @@ static int snode_bg_viewmove_invoke(bContext *C, wmOperator *op, const wmEvent * return OPERATOR_RUNNING_MODAL; } -static int snode_bg_viewmove_cancel(bContext *UNUSED(C), wmOperator *op) +static void snode_bg_viewmove_cancel(bContext *UNUSED(C), wmOperator *op) { MEM_freeN(op->customdata); op->customdata = NULL; - - return OPERATOR_CANCELLED; } void NODE_OT_backimage_move(wmOperatorType *ot) @@ -612,10 +610,9 @@ static int sample_modal(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_RUNNING_MODAL; } -static int sample_cancel(bContext *C, wmOperator *op) +static void sample_cancel(bContext *C, wmOperator *op) { sample_exit(C, op); - return OPERATOR_CANCELLED; } void NODE_OT_backimage_sample(wmOperatorType *ot) |