From a9212200e92f0220732c8419cf9387781fb1e6c8 Mon Sep 17 00:00:00 2001 From: devicerandom Date: Wed, 25 Feb 2009 14:19:41 +0000 Subject: [PATCH] (hooke_cli.py , hooke.py) fixed nasty bug preventing correct datasets to be chosen --- generalvclamp.py | 2 ++ hooke.py | 7 +++++-- hooke_cli.py | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) 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() -- 2.26.2