Commit c9f24a3e92d7a3133dca2f92e53984cfb99d1754
1 parent
eeaee6fa
Exists in
master
and in
68 other branches
FIX: Slice menu under macos
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
invesalius/gui/widgets/slice_menu.py
| ... | ... | @@ -103,7 +103,7 @@ class SliceMenu(wx.Menu): |
| 103 | 103 | # It doesn't work in Linux |
| 104 | 104 | self.Bind(wx.EVT_MENU, self.OnPopup) |
| 105 | 105 | # In Linux the bind must be putted in the submenu |
| 106 | - if sys.platform == 'linux2': | |
| 106 | + if sys.platform == 'linux2' or sys.platform == 'darwin': | |
| 107 | 107 | submenu_wl.Bind(wx.EVT_MENU, self.OnPopup) |
| 108 | 108 | submenu_pseudo_colours.Bind(wx.EVT_MENU, self.OnPopup) |
| 109 | 109 | submenu_image_tiling.Bind(wx.EVT_MENU, self.OnPopup) |
| ... | ... | @@ -122,8 +122,9 @@ class SliceMenu(wx.Menu): |
| 122 | 122 | id = evt.GetId() |
| 123 | 123 | item = self.ID_TO_TOOL_ITEM[evt.GetId()] |
| 124 | 124 | key = item.GetLabel() |
| 125 | - | |
| 125 | + print "OnPopup menu" | |
| 126 | 126 | if(key in const.WINDOW_LEVEL.keys()): |
| 127 | + print "a" | |
| 127 | 128 | window, level = const.WINDOW_LEVEL[key] |
| 128 | 129 | ps.Publisher().sendMessage('Bright and contrast adjustment image', |
| 129 | 130 | (window, level)) |
| ... | ... | @@ -137,11 +138,13 @@ class SliceMenu(wx.Menu): |
| 137 | 138 | ps.Publisher().sendMessage('Render volume viewer') |
| 138 | 139 | |
| 139 | 140 | elif(key in const.SLICE_COLOR_TABLE.keys()): |
| 141 | + print "b" | |
| 140 | 142 | values = const.SLICE_COLOR_TABLE[key] |
| 141 | 143 | ps.Publisher().sendMessage('Change colour table from background image', values) |
| 142 | 144 | ps.Publisher().sendMessage('Update slice viewer') |
| 143 | 145 | |
| 144 | 146 | elif(key in const.IMAGE_TILING.keys()): |
| 147 | + print "c" | |
| 145 | 148 | values = const.IMAGE_TILING[key] |
| 146 | 149 | ps.Publisher().sendMessage('Set slice viewer layout', values) |
| 147 | 150 | ps.Publisher().sendMessage('Update slice viewer') | ... | ... |