A correction on autopeak.py due to the add of curvetools.py (a self. was missing)
[hooke.git] / hooke.py
index 6bceecbd5d6043c30c2f971b0821d2f01c609a17..6a8a921949474b23473e91a3965335225e66d19b 100755 (executable)
--- a/hooke.py
+++ b/hooke.py
@@ -688,12 +688,15 @@ class MainWindow(wx.Frame):
             '''\r
         if dest==None:\r
             dest=self.current_plot_dest\r
-\r
-        plot=None\r
-        for aplot in self.plots:\r
-            if aplot.destination == dest:\r
-                plot=aplot\r
-        return plot\r
+        try:\r
+          plot=None\r
+          for aplot in self.plots:\r
+              if aplot.destination == dest:\r
+                  plot=aplot\r
+          return plot\r
+        except:\r
+           print "No curve available"\r
+           return None\r
 \r
     def _replot(self):\r
         '''\r