Bugfix #21893
authorTon Roosendaal <ton@blender.org>
Sat, 4 Dec 2010 13:46:25 +0000 (13:46 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 4 Dec 2010 13:46:25 +0000 (13:46 +0000)
Python Operator "Delete Edge Loop" (which keeps mesh connected)
changed selection if sliding operator failed. Simply added a
check for return value. Gosh, that Python code is not bad ;)

release/scripts/op/wm.py

index c6fe66d8909fec29b76018383d7cc65318ed9b60..dbaca5f67fb879c0b20b3fbb11acf65912236a5d 100644 (file)
@@ -30,11 +30,12 @@ class MESH_OT_delete_edgeloop(bpy.types.Operator):
     bl_label = "Delete Edge Loop"
 
     def execute(self, context):
-        bpy.ops.transform.edge_slide(value=1.0)
-        bpy.ops.mesh.select_more()
-        bpy.ops.mesh.remove_doubles()
+        if bpy.ops.transform.edge_slide(value=1.0) == 'FINISHED':
+            bpy.ops.mesh.select_more()
+            bpy.ops.mesh.remove_doubles()
 
-        return {'FINISHED'}
+            return {'FINISHED'}
+        return {'CANCELLED'}
 
 rna_path_prop = StringProperty(name="Context Attributes",
         description="rna context string", maxlen=1024, default="")