Commits

anatoly techtonik committed b1046cd

avoid recreating static controls on every refresh
it may stop random crashes

  • Participants
  • Parent commits 0f678f6

Comments (0)

Files changed (1)

File wxdebuglib/gui/detail.py

         sizer.Fit(self.nb)
     
     def display(self, item, called, total, stats):
+        self.itemname.SetLabel(item['name'])
+        self.script.SetLabel("File: "+item['script'])
         
-        self.itemname.Destroy()
-        self.script.Destroy()
-        self.time.Destroy()
-        
-        self.itemname = wx.StaticText(self.spanel, -1, item['name'],(10,10))
-        self.script = wx.StaticText(self.spanel, -1, "File: "+item['script'],(10,30))
-        
+        #import pdb; pdb.set_trace()
         try:
             sms = float(item['time']) / 10000.0
             spc = (float(item['time']) / float(total)) * 100.0
         else:
             cts = ""
         
-        self.time = wx.StaticText(self.spanel, -1, sts+cts,(10,50))
+        self.time.SetLabel(sts+cts)
         
         if not item.has_key('stack'):
             item['stack'] = []