(hooke_cli.py , hooke.py) fixed nasty bug preventing correct datasets to be chosen
authordevicerandom <devnull@localhost>
Wed, 25 Feb 2009 14:19:41 +0000 (14:19 +0000)
committerdevicerandom <devnull@localhost>
Wed, 25 Feb 2009 14:19:41 +0000 (14:19 +0000)
generalvclamp.py
hooke.py
hooke_cli.py

index be90d0d39a7160ebbf76ed3b084ba9a95cce3b1d..b7c9ed03cbc2e9c915e53748d7fbf460d84b53e3 100644 (file)
@@ -281,6 +281,8 @@ class generalvclampCommands:
 
         return (linefit[0],linefit[1],xtofit,ytofit)
     
+    
+    
 #====================
 #AUTOMATIC ANALYSES
 #====================
index d607db7e4aee20a46ab9adc14805a27ccfe9c70c..5c7dc06186ce06e095850909ba5099070b9f1c32 100755 (executable)
--- a/hooke.py
+++ b/hooke.py
@@ -304,6 +304,8 @@ class MainWindow(wx.Frame):
                         
             self.clicked_points=[]
             
+            self.measure_set=None
+            
             self.events_from_gui = events_from_gui
             
             '''
@@ -545,12 +547,13 @@ class MainWindow(wx.Frame):
             self.click_flags_functions['measure_points'][0]=True
             if 'num_of_points' in dir(event):
                 self.num_of_points=event.num_of_points
-     
+            if 'set' in dir(event):    
+                self.measure_set=event.set
      
         def MeasurePoints(self,event,current_set=1):
             dest=self.current_plot_dest
             try:
-                current_set=event.set
+                current_set=self.measure_set
             except AttributeError:
                 pass
             
index 6b0d314aa0ec3e6b6633ea245b1d4aada97073d0..6262cbe04d9a5d7d8be7d65862d4a5119a7f0892 100755 (executable)
@@ -130,8 +130,7 @@ class HookeCli(cmd.Cmd):
         '''
         general helper function for N-points measures
         '''
-        measure_points=self.list_of_events['measure_points']
-        wx.PostEvent(self.frame, measure_points(num_of_points=N, set=whatset))
+        wx.PostEvent(self.frame,self.list_of_events['measure_points'](num_of_points=N, set=whatset))
         while 1:
             try:
                 points=self.frame.events_from_gui.get()