CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/06/01 14:26:13

Modified files:
        .              : ChangeLog 
        lily           : stencil-scheme.cc stencil.cc 
        scm            : define-markup-commands.scm markup.scm 

Log message:
        (is_empty): check dim_ field for is_empty()
        too. Fixes inf error with added bass notes.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3703&tr2=1.3704&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/stencil-scheme.cc.diff?tr1=1.45&tr2=1.46&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/stencil.cc.diff?tr1=1.42&tr2=1.43&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-markup-commands.scm.diff?tr1=1.91&tr2=1.92&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/markup.scm.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3703 lilypond/ChangeLog:1.3704
--- lilypond/ChangeLog:1.3703   Wed Jun  1 13:16:26 2005
+++ lilypond/ChangeLog  Wed Jun  1 14:26:13 2005
@@ -1,5 +1,8 @@
 2005-06-01  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
 
+       * lily/stencil.cc (is_empty): check dim_ field for is_empty()
+       too. Fixes inf error with added bass notes.
+
        * scripts/lilypond-book.py (do_options): --psfonts doesn't take
        argument anymore.
 
Index: lilypond/lily/stencil-scheme.cc
diff -u lilypond/lily/stencil-scheme.cc:1.45 
lilypond/lily/stencil-scheme.cc:1.46
--- lilypond/lily/stencil-scheme.cc:1.45        Mon May 30 23:38:46 2005
+++ lilypond/lily/stencil-scheme.cc     Wed Jun  1 14:26:13 2005
@@ -65,7 +65,7 @@
   return s->expr ();
 }
 
-LY_DEFINE (ly_stencil_get_extent, "ly:stencil-extent",
+LY_DEFINE (ly_stencil_extent, "ly:stencil-extent",
           2, 0, 0, (SCM stil, SCM axis),
           "Return a pair of numbers signifying the extent of @var{stil} in "
           "@var{axis} direction (0 or 1 for x and y axis respectively).")
Index: lilypond/lily/stencil.cc
diff -u lilypond/lily/stencil.cc:1.42 lilypond/lily/stencil.cc:1.43
--- lilypond/lily/stencil.cc:1.42       Mon May 30 23:38:46 2005
+++ lilypond/lily/stencil.cc    Wed Jun  1 14:26:13 2005
@@ -56,12 +56,12 @@
   return dim_[a];
 }
 
-/* Hmm... maybe this is not such a good idea ; stuff can be empty,
-   while expr_ == '()  */
 bool
 Stencil::is_empty () const
 {
-  return expr_ == SCM_EOL;
+  return (expr_ == SCM_EOL
+         || dim_[X_AXIS].is_empty ()
+         || dim_[Y_AXIS].is_empty ());
 }
 
 SCM
Index: lilypond/scm/define-markup-commands.scm
diff -u lilypond/scm/define-markup-commands.scm:1.91 
lilypond/scm/define-markup-commands.scm:1.92
--- lilypond/scm/define-markup-commands.scm:1.91        Tue May  3 22:22:56 2005
+++ lilypond/scm/define-markup-commands.scm     Wed Jun  1 14:26:13 2005
@@ -274,10 +274,13 @@
 (def-markup-command (line layout props args) (markup-list?)
   "Put @var{args} in a horizontal line.  The property @code{word-space}
 determines the space between each markup in @var{args}."
+  (let*
+      ((stencils (map (lambda (m) (interpret-markup layout props m)) args))
+       (space    (chain-assoc-get 'word-space props)))
+
   (stack-stencil-line
-   (chain-assoc-get 'word-space props)
-   (remove ly:stencil-empty?
-          (map (lambda (m) (interpret-markup layout props m)) args))))
+   space
+   (remove ly:stencil-empty? stencils))))
 
 (def-markup-command (fromproperty layout props symbol) (symbol?)
   "Read the @var{symbol} from property settings, and produce a stencil
Index: lilypond/scm/markup.scm
diff -u lilypond/scm/markup.scm:1.5 lilypond/scm/markup.scm:1.6
--- lilypond/scm/markup.scm:1.5 Tue Apr 19 17:18:10 2005
+++ lilypond/scm/markup.scm     Wed Jun  1 14:26:13 2005
@@ -439,7 +439,7 @@
       
       (if (and (pair? (cdr stencils))
               (ly:stencil? (cadr stencils)))
-          (let* ((tail (stack-stencil-line  space (cdr stencils)))
+          (let* ((tail (stack-stencil-line space (cdr stencils)))
                  (head (car stencils))
                  (xoff (+ space (cdr (ly:stencil-extent head X)))))
             (ly:stencil-add head


_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to