Fix T44842: Modal Timer (template) should return {'CANCELLED'} when cancelled!
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 25 May 2015 15:42:10 +0000 (17:42 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 25 May 2015 15:43:28 +0000 (17:43 +0200)
release/scripts/templates_py/operator_modal_timer.py

index 4d36860b9e34da286b4ef6e47af687be558efe51..df4d10e656b604e5cbed173d0c2b888f8ffeb505 100644 (file)
@@ -10,7 +10,8 @@ class ModalTimerOperator(bpy.types.Operator):
 
     def modal(self, context, event):
         if event.type in {'RIGHTMOUSE', 'ESC'}:
-            return self.cancel(context)
+            self.cancel(context)
+            return {'CANCELLED'}
 
         if event.type == 'TIMER':
             # change theme color, silly!