/[ascend]/trunk/pygtk/diagnose.py
ViewVC logotype

Diff of /trunk/pygtk/diagnose.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 318 by johnpye, Thu Feb 16 02:53:56 2006 UTC revision 319 by johnpye, Thu Feb 23 12:30:40 2006 UTC
# Line 53  class DiagnoseWindow: Line 53  class DiagnoseWindow:
53          self.window.hide()          self.window.hide()
54    
55      def apply_prefs(self):      def apply_prefs(self):
56          vc = self.browser.prefs.getBoolPref("Diagnose","varcollapsed")          vc = self.browser.prefs.getBoolPref("Diagnose","varcollapsed",True)
57    
58          print "VARCOLLAPSED =",vc          print "VARCOLLAPSED =",vc
59          self.varcollapsed.set_active(vc)          self.varcollapsed.set_active(vc)
60          self.relcollapsed.set_active(self.browser.prefs.getBoolPref("Diagnose","relcollapsed"))          self.relcollapsed.set_active(self.browser.prefs.getBoolPref("Diagnose","relcollapsed",True))
61    
62      def prepare_data(self):      def prepare_data(self):
63          # convert incidence map to pylab numarray type:          # convert incidence map to pylab numarray type:
# Line 68  class DiagnoseWindow: Line 69  class DiagnoseWindow:
69          self.zoom=1;          self.zoom=1;
70            
71      def fill_values(self, block):      def fill_values(self, block):
72            
73          try:          try:
74              rl,cl,rh,ch = self.im.getBlockLocation(block)              rl,cl,rh,ch = self.im.getBlockLocation(block)
75          except IndexError:          except IndexError:
76              self.blockentry.set_text(str(self.block))              if block >= self.im.getNumBlocks():
77              return                  block = self.im.getNumBlocks() - 1
78          except RuntimeError:                  rl,cl,rh,ch = self.im.getBlockLocation(block)
79                else:              
80                    print "BLOCK INDEX ERROR: block =",block
81                    self.blockentry.set_text(str(self.block))
82                    return
83            except RuntimeError,e:
84                print "ERROR GETTING BLOCK LOCATION:",str(e)
85              self.blockentry.set_text(str(self.block))              self.blockentry.set_text(str(self.block))
86              return              return
87    

Legend:
Removed from v.318  
changed lines
  Added in v.319

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22