Skip to content

Commit

Permalink
fix: fix alt key value change behaviour on cycle operator
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-hm committed May 6, 2022
1 parent 7de5f2d commit 9efadc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ def modal(self, context, event):
self.mod_current_index = min(self.mod_current_index + 1, self.mod_count - 1)
elif not self.mod_cycle:
if self.util_count > 0:
self.util_current_index = (self.util_current_index + 1) % self.util_count

if self.key_alt:
self.toggle_frozen_util(self.util_current_index)
else:
self.util_current_index = (self.util_current_index + 1) % self.util_count

self.dirty = True

Expand All @@ -73,10 +73,10 @@ def modal(self, context, event):
self.mod_current_index = max(self.mod_current_index - 1, -1)
elif not self.mod_cycle:
if self.util_count > 0:
self.util_current_index = (self.util_current_index - 1) % self.util_count

if self.key_alt:
self.toggle_frozen_util(self.util_current_index)
else:
self.util_current_index = (self.util_current_index - 1) % self.util_count

self.dirty = True

Expand Down

0 comments on commit 9efadc8

Please sign in to comment.