Skip to content

Commit

Permalink
fix: ensure ESC key does not cancel paused operators
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-hm committed Mar 30, 2022
1 parent 4d8dc21 commit 01cfa93
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 55 deletions.
10 changes: 5 additions & 5 deletions generators/ring_and_bolt.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ def modal(self, context, event):
elif self.key_toggle_pin_overlay:
toggle_pin_overlay(self, event)

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.operator_passthrough:
update_overlay(self, context, event)

return {'PASS_THROUGH'}

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.key_increase_factor:
if self.key_alt:
self.base_inner_radius_factor = min(1, self.base_inner_radius_factor * 10.0)
Expand Down
10 changes: 5 additions & 5 deletions generators/screw_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ def modal(self, context, event):
elif self.key_toggle_pin_overlay:
toggle_pin_overlay(self, event)

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.operator_passthrough:
update_overlay(self, context, event)

return {'PASS_THROUGH'}

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.key_increase_factor:
if self.key_alt:
self.base_offset_factor = min(1, self.base_offset_factor * 10.0)
Expand Down
10 changes: 5 additions & 5 deletions power_mods/screw.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ def modal(self, context, event):
elif self.key_toggle_pin_overlay:
toggle_pin_overlay(self, event)

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.operator_passthrough:
update_overlay(self, context, event)

return {'PASS_THROUGH'}

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.key_increase_factor:
if self.key_ctrl_alt:
self.base_offset_factor = min(1, self.base_offset_factor * 10.0)
Expand Down
10 changes: 5 additions & 5 deletions power_mods/solidify.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ def modal(self, context, event):
elif self.key_toggle_pin_overlay:
toggle_pin_overlay(self, event)

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.operator_passthrough:
update_overlay(self, context, event)

return {'PASS_THROUGH'}

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.key_increase_factor:
if self.key_ctrl:
self.base_offset_factor = min(1, self.base_offset_factor * 10.0)
Expand Down
10 changes: 5 additions & 5 deletions power_mods/vertex_bevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ def modal(self, context, event):
elif self.key_toggle_pin_overlay:
toggle_pin_overlay(self, event)

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.operator_passthrough:
update_overlay(self, context, event)

return {'PASS_THROUGH'}

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.key_increase_factor:
if self.key_alt:
self.base_width_factor = min(1, self.base_width_factor * 10.0)
Expand Down
10 changes: 5 additions & 5 deletions power_mods/weighted_normal_bevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ def modal(self, context, event):
elif self.key_toggle_pin_overlay:
toggle_pin_overlay(self, event)

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.operator_passthrough:
update_overlay(self, context, event)

return {'PASS_THROUGH'}

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.key_increase_factor:
self.base_width_factor = min(1, self.base_width_factor * 10.0)

Expand Down
10 changes: 5 additions & 5 deletions sketching/blank_sketch.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ def modal(self, context, event):
elif self.key_toggle_pin_overlay:
toggle_pin_overlay(self, event)

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.operator_passthrough:
update_overlay(self, context, event)

return {'PASS_THROUGH'}

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.key_confirm_alternative:
self.finish(context)

Expand Down
10 changes: 5 additions & 5 deletions sketching/geo_lift.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ def modal(self, context, event):
elif self.key_toggle_pin_overlay:
toggle_pin_overlay(self, event)

elif self.key_cancel:
self.clean_up(context)

return {'CANCELLED'}

elif self.key_step_up:
if self.key_alt:
self.selection_type = (self.selection_type + 1) % 3
Expand Down Expand Up @@ -55,6 +50,11 @@ def modal(self, context, event):

elif self.key_confirm:
return {'PASS_THROUGH'}

elif self.key_cancel:
self.clean_up(context)

return {'CANCELLED'}

elif self.key_confirm_alternative:
return self.finish(context)
Expand Down
10 changes: 5 additions & 5 deletions sketching/view_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ def modal(self, context, event):
elif self.key_toggle_pin_overlay:
toggle_pin_overlay(self, event)

elif self.key_cancel:
self.clean_up(context)

return {'CANCELLED'}

elif self.operator_passthrough:
update_overlay(self, context, event)

return {'PASS_THROUGH'}

elif self.key_cancel:
self.clean_up(context)

return {'CANCELLED'}

elif self.key_step_up:
if self.key_alt:
self.selection_type = (self.selection_type + 1) % 3
Expand Down
10 changes: 5 additions & 5 deletions utils/seams.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ def modal(self, context, event):
elif self.key_toggle_pin_overlay:
toggle_pin_overlay(self, event)

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.operator_passthrough:
update_overlay(self, context, event)

return {'PASS_THROUGH'}

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.key_step_up:
if self.key_alt:
self.commit_auto_smooth = not self.commit_auto_smooth
Expand Down
10 changes: 5 additions & 5 deletions utils/smooth.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ def modal(self, context, event):
elif self.key_toggle_pin_overlay:
toggle_pin_overlay(self, event)

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.operator_passthrough:
update_overlay(self, context, event)

return {'PASS_THROUGH'}

elif self.key_cancel:
self.revert(context)

return {'CANCELLED'}

elif self.key_step_up:
self.angle = min(180, self.angle + angle_factor)

Expand Down

0 comments on commit 01cfa93

Please sign in to comment.