Skip to content

Commit

Permalink
Merge branch 'master' of github.com:invesalius/invesalius3
Browse files Browse the repository at this point in the history
  • Loading branch information
paulojamorim committed Apr 15, 2014
2 parents ffbeeb9 + 2b8afea commit 9c8083a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
26 changes: 13 additions & 13 deletions invesalius/gui/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,21 +532,21 @@ def __init_items(self):

############################### EDIT###############################
# Flip
flip_menu = wx.Menu()
app = flip_menu.Append
app(const.ID_FLIP_X, _("R <-> L"))
app(const.ID_FLIP_Y, _("A <-> P"))
app(const.ID_FLIP_Z, _("T <-> B"))

swap_axes_menu = wx.Menu()
app = swap_axes_menu.Append
app(const.ID_SWAP_XY, _("R-L <-> A-P"))
app(const.ID_SWAP_XZ, _("R-L <-> T-B"))
app(const.ID_SWAP_YZ, _("A-P <-> T-B"))
#flip_menu = wx.Menu()
#app = flip_menu.Append
#app(const.ID_FLIP_X, _("R <-> L"))
#app(const.ID_FLIP_Y, _("A <-> P"))
#app(const.ID_FLIP_Z, _("T <-> B"))

#swap_axes_menu = wx.Menu()
#app = swap_axes_menu.Append
#app(const.ID_SWAP_XY, _("R-L <-> A-P"))
#app(const.ID_SWAP_XZ, _("R-L <-> T-B"))
#app(const.ID_SWAP_YZ, _("A-P <-> T-B"))

file_edit = wx.Menu()
file_edit.AppendMenu(wx.NewId(), _('Flip'), flip_menu)
file_edit.AppendMenu(wx.NewId(), _('Swap axes'), swap_axes_menu)
#file_edit.AppendMenu(wx.NewId(), _('Flip'), flip_menu)
#file_edit.AppendMenu(wx.NewId(), _('Swap axes'), swap_axes_menu)


d = const.ICON_DIR
Expand Down
7 changes: 7 additions & 0 deletions invesalius/gui/task_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,11 @@ def OnRemoveMasks(self, pubsub_evt):
for i in list_index:
self.combo_mask_name.Delete(i)

if self.combo_mask_name.IsEmpty():
self.combo_mask_name.SetValue('')
self.Disable()


def __bind_events_wx(self):
self.Bind(grad.EVT_THRESHOLD_CHANGED, self.OnSlideChanged, self.gradient)
self.Bind(grad.EVT_THRESHOLD_CHANGING, self.OnSlideChanging, self.gradient)
Expand Down Expand Up @@ -454,6 +459,8 @@ def SetItemsColour(self, evt_pubsub):
self.button_colour.SetColour(colour)

def AddMask(self, evt_pubsub):
if self.combo_mask_name.IsEmpty():
self.Enable()
mask_name = evt_pubsub.data[1]
mask_thresh = evt_pubsub.data[2]
mask_colour = [int(c*255) for c in evt_pubsub.data[3]]
Expand Down

0 comments on commit 9c8083a

Please sign in to comment.