Commit 63be42db9b589395332ea1b8be489ff0879d4ce0

Authored by Paulo Henrique Junqueira Amorim
1 parent a019f326

ENH: Hide default cursor in the editor mode

invesalius/data/slice_.py
@@ -107,6 +107,10 @@ class Slice(object): @@ -107,6 +107,10 @@ class Slice(object):
107 if (state in const.SLICE_STYLES): 107 if (state in const.SLICE_STYLES):
108 new_state = self.interaction_style.RemoveState(state) 108 new_state = self.interaction_style.RemoveState(state)
109 ps.Publisher().sendMessage('Set slice interaction style', new_state) 109 ps.Publisher().sendMessage('Set slice interaction style', new_state)
  110 +
  111 + if (state == const.SLICE_STATE_EDITOR):
  112 + ps.Publisher().sendMessage('Set interactor default cursor')
  113 +
110 114
111 def OnCloseProject(self, pubsub_evt): 115 def OnCloseProject(self, pubsub_evt):
112 self.CloseProject() 116 self.CloseProject()
invesalius/data/viewer_slice.py
@@ -836,8 +836,11 @@ class Viewer(wx.Panel): @@ -836,8 +836,11 @@ class Viewer(wx.Panel):
836 ps.Publisher().subscribe(self.OnHideText, 836 ps.Publisher().subscribe(self.OnHideText,
837 'Hide text actors on viewers') 837 'Hide text actors on viewers')
838 ps.Publisher().subscribe(self.OnExportPicture,'Export picture to file') 838 ps.Publisher().subscribe(self.OnExportPicture,'Export picture to file')
839 -  
840 - 839 + ps.Publisher().subscribe(self.SetDefaultCursor, 'Set interactor default cursor')
  840 +
  841 + def SetDefaultCursor(self, pusub_evt):
  842 + self.interactor.SetCursor(wx.StockCursor(wx.CURSOR_DEFAULT))
  843 +
841 def OnExportPicture(self, pubsub_evt): 844 def OnExportPicture(self, pubsub_evt):
842 ps.Publisher().sendMessage('Begin busy cursor') 845 ps.Publisher().sendMessage('Begin busy cursor')
843 view_prop_list = [] 846 view_prop_list = []