Commit 6b02c8b8ad100d7cff156f6a9062cc082dc527c7
1 parent
00a27689
Exists in
master
and in
68 other branches
ENH: Raycasting menu with radio hability.
Showing
3 changed files
with
7 additions
and
3 deletions
Show diff stats
invesalius/constants.py
invesalius/data/volume.py
| ... | ... | @@ -23,7 +23,7 @@ import vtk |
| 23 | 23 | import wx |
| 24 | 24 | import wx.lib.pubsub as ps |
| 25 | 25 | |
| 26 | -import constants | |
| 26 | +import constants as const | |
| 27 | 27 | from project import Project |
| 28 | 28 | |
| 29 | 29 | Kernels = { |
| ... | ... | @@ -96,7 +96,7 @@ class Volume(): |
| 96 | 96 | def LoadConfig(self, label): |
| 97 | 97 | print label |
| 98 | 98 | if not label: |
| 99 | - label = "Skin On Blue" | |
| 99 | + label = const.RAYCASTING_LABEL | |
| 100 | 100 | |
| 101 | 101 | path = os.path.join("..", "presets", "raycasting", |
| 102 | 102 | label+".plist") | ... | ... |
invesalius/gui/default_viewers.py
| ... | ... | @@ -210,8 +210,10 @@ class VolumeToolPanel(wx.Panel): |
| 210 | 210 | menu = wx.Menu() |
| 211 | 211 | for name in const.RAYCASTING_TYPES: |
| 212 | 212 | id = wx.NewId() |
| 213 | - item = wx.MenuItem(menu, id, name) | |
| 213 | + item = wx.MenuItem(menu, id, name, kind=wx.ITEM_RADIO) | |
| 214 | 214 | menu.AppendItem(item) |
| 215 | + if name == const.RAYCASTING_LABEL: | |
| 216 | + item.Check(1) | |
| 215 | 217 | ID_TO_NAME[id] = name |
| 216 | 218 | self.menu_raycasting = menu |
| 217 | 219 | menu.Bind(wx.EVT_MENU, self.OnMenuRaycasting) | ... | ... |