Commit d37794829110bfae6dbe867548f22d43f0be02f3
1 parent
102faa25
Exists in
master
and in
68 other branches
ENH: Restructuring state of the tools
Showing
2 changed files
with
15 additions
and
13 deletions
Show diff stats
invesalius/constants.py
| ... | ... | @@ -322,20 +322,22 @@ ID_PRINT_SCREENSHOT, ID_EXIT] = [wx.NewId() for number in range(10)] |
| 322 | 322 | |
| 323 | 323 | |
| 324 | 324 | #--------------------------------------------------------- |
| 325 | -SLICE_STATE_DEFAULT = 0 | |
| 325 | +STATE_DEFAULT = 0 | |
| 326 | 326 | SLICE_STATE_EDITOR = 1 |
| 327 | -SLICE_STATE_WL = 2 | |
| 328 | -SLICE_STATE_SPIN = 3 | |
| 329 | -SLICE_STATE_ZOOM = 4 | |
| 330 | -SLICE_STATE_ZOOM_SL = 5 | |
| 327 | +STATE_WL = 2 | |
| 328 | +STATE_SPIN = 3 | |
| 329 | +STATE_ZOOM = 4 | |
| 330 | +STATE_ZOOM_SL = 5 | |
| 331 | 331 | SLICE_STATE_CROSS = 6 |
| 332 | 332 | SLICE_STATE_SCROLL = 7 |
| 333 | +STATE_PAN = 8 | |
| 333 | 334 | |
| 334 | -LEVEL = {SLICE_STATE_DEFAULT: 0, | |
| 335 | +LEVEL = {STATE_DEFAULT: 0, | |
| 335 | 336 | SLICE_STATE_EDITOR: 1, |
| 336 | - SLICE_STATE_WL: 2, | |
| 337 | - SLICE_STATE_SPIN: 2, | |
| 338 | - SLICE_STATE_ZOOM: 2, | |
| 339 | - SLICE_STATE_ZOOM_SL: 2, | |
| 337 | + STATE_WL: 2, | |
| 338 | + STATE_SPIN: 2, | |
| 339 | + STATE_ZOOM: 2, | |
| 340 | + STATE_ZOOM_SL: 2, | |
| 340 | 341 | SLICE_STATE_CROSS: 2, |
| 341 | - SLICE_STATE_SCROLL: 2} | |
| 342 | + SLICE_STATE_SCROLL: 2, | |
| 343 | + STATE_PAN:2} | |
| 342 | 344 | \ No newline at end of file | ... | ... |
invesalius/mode.py
| ... | ... | @@ -74,8 +74,8 @@ class SliceMode(object): |
| 74 | 74 | self.stack = {} |
| 75 | 75 | |
| 76 | 76 | # push default value to stack |
| 77 | - self.stack[const.LEVEL[const.SLICE_STATE_DEFAULT]] = \ | |
| 78 | - const.SLICE_STATE_DEFAULT | |
| 77 | + self.stack[const.LEVEL[const.STATE_DEFAULT]] = \ | |
| 78 | + const.STATE_DEFAULT | |
| 79 | 79 | |
| 80 | 80 | # bind pubsub evt |
| 81 | 81 | self.__bind_events() | ... | ... |