Commit 7ac25597b80e4a9401b7f642b423c78170dea18b
1 parent
59d4c12a
Exists in
master
and in
6 other branches
ENH: The cursor doesn't disappear when clicked
Showing
1 changed file
with
5 additions
and
4 deletions
Show diff stats
invesalius/data/viewer_slice.py
... | ... | @@ -132,12 +132,13 @@ class Viewer(wx.Panel): |
132 | 132 | action[mode][event]) |
133 | 133 | |
134 | 134 | def OnEnterInteractor(self, obj, evt): |
135 | - print dir(self.GetCursor()) | |
135 | + mouse_cursor = wx.StockCursor(wx.CURSOR_BLANK) | |
136 | + self.SetCursor(mouse_cursor) | |
136 | 137 | |
137 | 138 | def OnLeaveInteractor(self, obj, evt): |
138 | 139 | for slice_data in self.slice_data_list: |
139 | 140 | slice_data.cursor.Show(0) |
140 | - self.interactor.Render() | |
141 | + self.interactor.Render() | |
141 | 142 | |
142 | 143 | def ChangeBrushSize(self, pubsub_evt): |
143 | 144 | size = pubsub_evt.data |
... | ... | @@ -226,6 +227,8 @@ class Viewer(wx.Panel): |
226 | 227 | slice_data = self.get_slice_data(render) |
227 | 228 | |
228 | 229 | # TODO: Improve! |
230 | + for i in self.slice_data_list: | |
231 | + i.cursor.Show(0) | |
229 | 232 | slice_data.cursor.Show() |
230 | 233 | |
231 | 234 | self.pick.Pick(mouse_x, mouse_y, 0, render) |
... | ... | @@ -250,8 +253,6 @@ class Viewer(wx.Panel): |
250 | 253 | else: |
251 | 254 | self.interactor.Render() |
252 | 255 | |
253 | - slice_data.cursor.Show(0) | |
254 | - | |
255 | 256 | def OnCrossMove(self, obj, evt_vtk): |
256 | 257 | coord = self.get_coordinate() |
257 | 258 | # Update position in other slices | ... | ... |