]> git.donarmstrong.com Git - lilypond.git/commitdiff
(print): suicide if we don't have any
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 2 Mar 2006 00:12:05 +0000 (00:12 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 2 Mar 2006 00:12:05 +0000 (00:12 +0000)
elements. Fixes hara kiri'd instrument names.

ChangeLog
lily/system-start-text.cc
scripts/midi2ly.py

index 20ae573092070a55513ea69b9c1ab7579c1e24a4..cf93e670e63079b460b0ec3f8caac7e77e11e93f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-03-02  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * lily/system-start-text.cc (print): suicide if we don't have any
+       elements. Fixes hara kiri'd instrument names.
+
+       * scripts/mup2ly.py (Module): remove.
+
 2006-03-01  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * Documentation/user/global.itely (A single music expression):
index 1e7399409a2672915ace755028d79fe97539e14d..2bc4e507d65ec6cb17758c907a31113d48eda90b 100644 (file)
@@ -56,7 +56,18 @@ System_start_text::print (SCM smob)
 {
   Spanner *me = unsmob_spanner (smob);
 
-  extract_grob_set (me, "elements", elts);
+  extract_grob_set (me, "elements", all_elts);
+  vector<Grob*> elts;
+  for (vsize i = 0; i < all_elts.size (); i++)
+    if (all_elts[i]->is_live ())
+      elts.push_back (all_elts[i]);
+
+  if (!elts.size ())
+    {
+      me->suicide ();
+      return SCM_EOL;
+    }
+  
   Grob *common = common_refpoint_of_array (elts, me, Y_AXIS);
 
   Interval ext;
index 31ce07caaa580a4dd99842b3e10019173bc256ce..798f3efe4109e7820cd52b21d1f2bca63edc46fc 100644 (file)
@@ -56,8 +56,6 @@ for p in ['share', 'lib']:
        datadir = os.path.abspath (bindir + '/../%s/lilypond/current/python/' % p)
        sys.path.insert (0, datadir)
 
-################################################################
-
 import midi
 import lilylib as ly
 
@@ -114,7 +112,7 @@ Copyright (c) %s by
 %s
 '''  ( '2001--2006',
        _('Distributed under terms of the GNU General Public License.'),
-       _('It comes with NO WARRANTY.'))
+       _('It comes with NO WARRANTY.')))
 
 
 def progress (s):