diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-03 05:24:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-03 05:24:53 +0300 |
commit | 9bda43ed27479534ca15a2189b957f4068d1ba8a (patch) | |
tree | 3125e4e4c9f153d511f8037f2586574144b3a6dd /release/scripts/op | |
parent | e2f5d31453c8893ad072951e7bceeb3ad549ee17 (diff) |
- WM_OT_context_cycle_int wasnt working (also wasnt used anywhere)
- remove console zoom operator, use WM_OT_context_cycle_int instead.
- use WM_OT_context_cycle_int for text editor zoom also (Ctrl +/- and Ctrl+MouseWheel)
Diffstat (limited to 'release/scripts/op')
-rw-r--r-- | release/scripts/op/wm.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/release/scripts/op/wm.py b/release/scripts/op/wm.py index ef7386049c3..f1eda24b7ca 100644 --- a/release/scripts/op/wm.py +++ b/release/scripts/op/wm.py @@ -204,25 +204,26 @@ class WM_OT_context_cycle_int(bpy.types.Operator): reverse = rna_reverse_prop def execute(self, context): - - value = context_path_validate(context, self.properties.path) + path = self.properties.path + value = context_path_validate(context, path) if value is Ellipsis: return {'PASS_THROUGH'} - self.properties.value = value if self.properties.reverse: - self.properties.value -= 1 + value -= 1 else: - self.properties.value += 1 - execute_context_assign(self, context) + value += 1 - if self.properties.value != eval("context.%s" % self.properties.path): + exec("context.%s=value" % path) + + if value != eval("context.%s" % path): # relies on rna clamping int's out of the range if self.properties.reverse: - self.properties.value = (1 << 32) + value = (1 << 32) else: - self.properties.value = - (1 << 32) - execute_context_assign(self, context) + value = - (1 << 32) + + exec("context.%s=value" % path) return {'FINISHED'} |