Commit 93778ed404d1d98fcfa2662dd06b88c615a2cecb

Authored by tfmoraes
1 parent a9c7cd4b

ENH: A better position to slice number

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
invesalius/data/slice_data.py
... ... @@ -41,19 +41,19 @@ class SliceData(object):
41 41 text_actor = vtk.vtkTextActor()
42 42 text_actor.SetInput("%d" % self.number)
43 43 text_actor.GetTextProperty().ShallowCopy(text_property)
44   - text_actor.SetPosition(1,1)
  44 + text_actor.SetPosition(10, 10)
45 45 self.text_actor = text_actor
46 46  
47   - def SetNumber(self, number):
48   - self.number = number
49   - self.text_actor.SetInput("%d" % self.number)
50   -
51 47 def SetCursor(self, cursor):
52 48 if self.cursor:
53 49 self.renderer.RemoveActor(self.cursor.actor)
54 50 self.renderer.AddActor(cursor.actor)
55 51 self.cursor = cursor
56 52  
  53 + def SetNumber(self, number):
  54 + self.number = number
  55 + self.text_actor.SetInput("%d" % self.number)
  56 +
57 57 def SetOrientation(self, orientation):
58 58 self.orientation = orientation
59 59 colour = const.ORIENTATION_COLOUR[self.orientation]
... ...