From d37794829110bfae6dbe867548f22d43f0be02f3 Mon Sep 17 00:00:00 2001 From: paulojamorim Date: Mon, 23 Nov 2009 18:01:24 +0000 Subject: [PATCH] ENH: Restructuring state of the tools --- invesalius/constants.py | 24 +++++++++++++----------- invesalius/mode.py | 4 ++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/invesalius/constants.py b/invesalius/constants.py index fe5a0a8..47c81df 100644 --- a/invesalius/constants.py +++ b/invesalius/constants.py @@ -322,20 +322,22 @@ ID_PRINT_SCREENSHOT, ID_EXIT] = [wx.NewId() for number in range(10)] #--------------------------------------------------------- -SLICE_STATE_DEFAULT = 0 +STATE_DEFAULT = 0 SLICE_STATE_EDITOR = 1 -SLICE_STATE_WL = 2 -SLICE_STATE_SPIN = 3 -SLICE_STATE_ZOOM = 4 -SLICE_STATE_ZOOM_SL = 5 +STATE_WL = 2 +STATE_SPIN = 3 +STATE_ZOOM = 4 +STATE_ZOOM_SL = 5 SLICE_STATE_CROSS = 6 SLICE_STATE_SCROLL = 7 +STATE_PAN = 8 -LEVEL = {SLICE_STATE_DEFAULT: 0, +LEVEL = {STATE_DEFAULT: 0, SLICE_STATE_EDITOR: 1, - SLICE_STATE_WL: 2, - SLICE_STATE_SPIN: 2, - SLICE_STATE_ZOOM: 2, - SLICE_STATE_ZOOM_SL: 2, + STATE_WL: 2, + STATE_SPIN: 2, + STATE_ZOOM: 2, + STATE_ZOOM_SL: 2, SLICE_STATE_CROSS: 2, - SLICE_STATE_SCROLL: 2} + SLICE_STATE_SCROLL: 2, + STATE_PAN:2} \ No newline at end of file diff --git a/invesalius/mode.py b/invesalius/mode.py index ba83061..2d845f8 100644 --- a/invesalius/mode.py +++ b/invesalius/mode.py @@ -74,8 +74,8 @@ class SliceMode(object): self.stack = {} # push default value to stack - self.stack[const.LEVEL[const.SLICE_STATE_DEFAULT]] = \ - const.SLICE_STATE_DEFAULT + self.stack[const.LEVEL[const.STATE_DEFAULT]] = \ + const.STATE_DEFAULT # bind pubsub evt self.__bind_events() -- libgit2 0.21.2