diff bin/curvecalc @ 697:6e9b5ed1e863

finesse ui. add some mouse events on the points in a curve Ignore-this: 69ed00763985926b92e776fc14298b45
author Drew Perttula <drewp@bigasterisk.com>
date Sat, 09 Jun 2012 10:28:06 +0000
parents 929ccd4ec800
children 2aac2ef23495
line wrap: on
line diff
--- a/bin/curvecalc	Sat Jun 09 10:03:36 2012 +0000
+++ b/bin/curvecalc	Sat Jun 09 10:28:06 2012 +0000
@@ -69,23 +69,25 @@
                 print "reload curveview.py"
                 curvesVBox = wtree.get_object("curves")
                 [curvesVBox.remove(c) for c in curvesVBox.get_children()]
-                reload(curveview)
-                # mem problem somewhere; need to hold a ref to this
-                self.curvesetView = curveview.Curvesetview(
-                    curvesVBox, curveset)
-                self.curvesetView._mtime = m
+                try:
+                    reload(curveview)
+                    # mem problem somewhere; need to hold a ref to this
+                    self.curvesetView = curveview.Curvesetview(
+                        curvesVBox, curveset)
+                    self.curvesetView._mtime = m
 
-                # curvesetview must already exist, since this makes 'add_curve'
-                # signals for all the initial curves
-                curveset.load(basename=os.path.join(
-                    showconfig.curvesDir(),
-                    showconfig.songFilenameFromURI(song)),
-                              skipMusic=opts.skip_music)
-                # this is scheduled after some tk shuffling, to try to minimize
-                # the number of times we redraw the curve at startup. If tk is
-                # very slow, it's ok. You'll just get some wasted redraws.
-                self.curvesetView.goLive()
-                
+                    # curvesetview must already exist, since this makes 'add_curve'
+                    # signals for all the initial curves
+                    curveset.load(basename=os.path.join(
+                        showconfig.curvesDir(),
+                        showconfig.songFilenameFromURI(song)),
+                                  skipMusic=opts.skip_music)
+                    # this is scheduled after some tk shuffling, to try to minimize
+                    # the number of times we redraw the curve at startup. If tk is
+                    # very slow, it's ok. You'll just get some wasted redraws.
+                    self.curvesetView.goLive()
+                except Exception, e:
+                    print "reload failed:", e
             reactor.callLater(1, refreshCurveView)
         refreshCurveView()