Commit 77023ee366177182605654ff5afc9e2c0314b5ea
1 parent
117db004
Exists in
master
and in
6 other branches
ENH: Changing the cursor's size and colour
Showing
1 changed file
with
4 additions
and
6 deletions
Show diff stats
invesalius/data/viewer_slice.py
@@ -135,17 +135,15 @@ class Viewer(wx.Panel): | @@ -135,17 +135,15 @@ class Viewer(wx.Panel): | ||
135 | def ChangeBrushSize(self, pubsub_evt): | 135 | def ChangeBrushSize(self, pubsub_evt): |
136 | size = pubsub_evt.data | 136 | size = pubsub_evt.data |
137 | self._brush_cursor_size = size | 137 | self._brush_cursor_size = size |
138 | - self.cursor.SetSize(size) | ||
139 | - self.ren.Render() | ||
140 | - self.interactor.Render() | 138 | + for slice_data in self.slice_data_list: |
139 | + slice_data.cursor.SetSize(size) | ||
141 | 140 | ||
142 | def ChangeBrushColour(self, pubsub_evt): | 141 | def ChangeBrushColour(self, pubsub_evt): |
143 | vtk_colour = pubsub_evt.data[3] | 142 | vtk_colour = pubsub_evt.data[3] |
144 | self._brush_cursor_colour = vtk_colour | 143 | self._brush_cursor_colour = vtk_colour |
145 | if (self.cursor): | 144 | if (self.cursor): |
146 | - self.cursor.SetColour(vtk_colour) | ||
147 | - self.ren.Render() | ||
148 | - self.interactor.Render() | 145 | + for slice_data in self.slice_data_list: |
146 | + slice_data.cursor.SetColour(vtk_colour) | ||
149 | 147 | ||
150 | def SetBrushColour(self, pubsub_evt): | 148 | def SetBrushColour(self, pubsub_evt): |
151 | colour_wx = pubsub_evt.data | 149 | colour_wx = pubsub_evt.data |