diff --git a/flax/fieldsets/demo b/flax/fieldsets/demo --- a/flax/fieldsets/demo +++ b/flax/fieldsets/demo @@ -1,6 +1,11 @@
diff --git a/flax/tracker b/flax/tracker --- a/flax/tracker +++ b/flax/tracker @@ -12,6 +12,8 @@ import dispatcher import Tkinter as tk +defaultfont="arial 8" + def pairdist(pair1,pair2): return sqrt((pair1[0]-pair2[0])**2+(pair1[1]-pair2[1])**2) @@ -136,7 +138,7 @@ class FieldDisplay: outlinestipple='gray50') # make text - self.txt=c.create_text(0,0,text=f.name(),font="arial 10 bold", + self.txt=c.create_text(0,0,text=f.name(),font=defaultfont+" bold", fill='white',anchor='c', tags=self.tags) @@ -151,10 +153,12 @@ class FieldDisplay: dworld=c.canvas2world_vector(*dcan) self.field.center(*(self.field.center()+dworld)) self._lastmouse=ev.x,ev.y - dispatcher.send("field coord changed") self.setcoords() # redraw def release(ev): - del self._lastmouse + if hasattr(self,'_lastmouse'): + del self._lastmouse + dispatcher.send("field coord changed") # updates bounds + c.tag_bind(self.txt,"