Commit 31063346d14008a4300a083d6729c225aea8fa58

Authored by tfmoraes
1 parent 58501c8f

When changing the mask colour changing the pencil cursor colour too

invesalius/data/cursor_actors.py
... ... @@ -49,6 +49,7 @@ class CursorCircle:
49 49 """
50 50 Function to plot the circle
51 51 """
  52 + print "Building circle cursor", self.orientation
52 53 r = self.radius
53 54 t = 0
54 55  
... ... @@ -68,6 +69,8 @@ class CursorCircle:
68 69  
69 70 self.mapper.SetInputConnection(self.segment.GetOutputPort())
70 71 self.actor.SetMapper(self.mapper)
  72 + self.actor.GetProperty().SetOpacity(self.opacity)
  73 + self.actor.GetProperty().SetColor(self.colour)
71 74 self.actor.PickableOff()
72 75  
73 76 def GenerateCicleSegment(self, t):
... ... @@ -210,6 +213,7 @@ class CursorRectangle:
210 213 """
211 214 Function to plot the Retangle
212 215 """
  216 + print "Building rectangle cursor", self.orientation
213 217 mapper = vtk.vtkPolyDataMapper()
214 218 self.retangle = vtk.vtkCubeSource()
215 219 self.actor = actor = vtk.vtkActor()
... ...
invesalius/data/viewer_slice.py
... ... @@ -522,9 +522,8 @@ class Viewer(wx.Panel):
522 522 colour_wx = pubsub_evt.data
523 523 colour_vtk = [colour/float(255) for colour in colour_wx]
524 524 self._brush_cursor_colour = colour_vtk
525   - if self.cursor:
526   - self.cursor.SetColour(colour_vtk)
527   - self.interactor.Render()
  525 + if self.slice_data.cursor:
  526 + self.slice_data.cursor.SetColour(colour_vtk)
528 527  
529 528 def ChangeBrushActor(self, pubsub_evt):
530 529 brush_type = pubsub_evt.data
... ...