[Bf-blender-cvs] [a1e2885] wiggly-widgets: More silly mistakes in widget move code.

Antony Riakiotakis noreply at git.blender.org
Wed Dec 17 18:16:42 CET 2014


Commit: a1e28859c7a2bb757d26f1fe71e41ea992c38e15
Author: Antony Riakiotakis
Date:   Wed Dec 17 18:14:16 2014 +0100
Branches: wiggly-widgets
https://developer.blender.org/rBa1e28859c7a2bb757d26f1fe71e41ea992c38e15

More silly mistakes in widget move code.

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

M	source/blender/editors/object/object_fmap.c

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

diff --git a/source/blender/editors/object/object_fmap.c b/source/blender/editors/object/object_fmap.c
index fb36ae9..2959749 100644
--- a/source/blender/editors/object/object_fmap.c
+++ b/source/blender/editors/object/object_fmap.c
@@ -202,10 +202,12 @@ static void object_fmap_swap_edit_mode(Object *ob, int num1, int num2)
 					map = BM_ELEM_CD_GET_VOID_P(efa, cd_fmap_offset);
 					
 					if (map) {
-						if (*map == num1 && num1 != -1)
-							*map = num2;
-						if (*map == num2 && num2 != -1)
-							*map = num1;
+						if (num1 != -1) {
+							if (*map == num1)
+								*map = num2;
+							else if (*map == num2)
+								*map = num1;
+						}
 					}
 				}
 			}
@@ -224,10 +226,12 @@ static void object_fmap_swap_object_mode(Object *ob, int num1, int num2)
 			
 			if (map) {
 				for (i = 0; i < me->totpoly; i++) {
-					if (map[i] == num1 && num1 != -1)
-						map[i] = num2;
-					if (map[i]== num2 && num2 != -1)
-						map[i] = num1;
+					if (num1 != -1) {
+						if (map[i] == num1)
+							map[i] = num2;
+						else if (map[i]== num2)
+							map[i] = num1;
+					}
 				}
 			}
 		}




More information about the Bf-blender-cvs mailing list