[Bf-blender-cvs] [716e712] master: Pose library sorting: return OPERATOR_CANCELLED when no-op

Sybren A. Stüvel noreply at git.blender.org
Fri Sep 16 17:34:08 CEST 2016


Commit: 716e712a8342fb9b27810ea01385aca65f7d7cd6
Author: Sybren A. Stüvel
Date:   Fri Sep 16 17:32:46 2016 +0200
Branches: master
https://developer.blender.org/rB716e712a8342fb9b27810ea01385aca65f7d7cd6

Pose library sorting: return OPERATOR_CANCELLED when no-op

A no-op happens when trying to move the top pose further up, or the
bottom pose further down.

===================================================================

M	source/blender/editors/armature/pose_lib.c

===================================================================

diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index f860614..b200aa2 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -770,7 +770,7 @@ static int poselib_move_exec(bContext *C, wmOperator *op)
 		void *prev = marker->prev;
 
 		if (prev == NULL)
-			return OPERATOR_FINISHED;
+			return OPERATOR_CANCELLED;
 
 		BLI_remlink(&act->markers, marker);
 		BLI_insertlinkbefore(&act->markers, prev, marker);
@@ -779,7 +779,7 @@ static int poselib_move_exec(bContext *C, wmOperator *op)
 		void *next = marker->next;
 
 		if (next == NULL)
-			return OPERATOR_FINISHED;
+			return OPERATOR_CANCELLED;
 
 		BLI_remlink(&act->markers, marker);
 		BLI_insertlinkafter(&act->markers, next, marker);




More information about the Bf-blender-cvs mailing list