From: devicerandom Date: Wed, 25 Feb 2009 14:19:41 +0000 (+0000) Subject: (hooke_cli.py , hooke.py) fixed nasty bug preventing correct datasets to be chosen X-Git-Tag: 0.9.0~50 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a9212200e92f0220732c8419cf9387781fb1e6c8;p=hooke.git (hooke_cli.py , hooke.py) fixed nasty bug preventing correct datasets to be chosen --- diff --git a/generalvclamp.py b/generalvclamp.py index be90d0d..b7c9ed0 100644 --- a/generalvclamp.py +++ b/generalvclamp.py @@ -281,6 +281,8 @@ class generalvclampCommands: return (linefit[0],linefit[1],xtofit,ytofit) + + #==================== #AUTOMATIC ANALYSES #==================== diff --git a/hooke.py b/hooke.py index d607db7..5c7dc06 100755 --- 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 diff --git a/hooke_cli.py b/hooke_cli.py index 6b0d314..6262cbe 100755 --- a/hooke_cli.py +++ b/hooke_cli.py @@ -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()