]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.32
authorfred <fred>
Sun, 24 Mar 2002 19:31:42 +0000 (19:31 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:31:42 +0000 (19:31 +0000)
src/beam.cc

index 44d51e0af9215ba967c7e933a96b3f5891af9a7a..1b0fa2baa3c53f610eb5983aae11e20f0ffa8b48 100644 (file)
@@ -217,7 +217,10 @@ Beam::stem_beams(Stem *here, Stem *next, Stem *prev)const
        int lhalfs= lhalfs = here->beams_left - prev->beams_right ;
        int lwholebeams= here->beams_left <? prev->beams_right ;
        Real w = (here->hpos() - prev->hpos())/4;
-       Atom a =  paper()->lookup_p_->beam(sl, w);
+       Symbol dummy;
+       Atom a(dummy);
+       if (lhalfs)             // generates warnings if not
+           a =  paper()->lookup_p_->beam(sl, w);
        a.translate(Offset (-w, -w * sl));
        for (int j = 0; j  < lhalfs; j++) {
            Atom b(a);
@@ -239,8 +242,10 @@ Beam::stem_beams(Stem *here, Stem *next, Stem *prev)const
            b.translate(Offset(0, -dir_i_ * dy * j));
            rightbeams.add( b ); 
        }
+
        w /= 4;
-       a = paper()->lookup_p_->beam(sl, w);
+       if (rhalfs)
+           a = paper()->lookup_p_->beam(sl, w);
        
        for (; j  < rwholebeams + rhalfs; j++) {
            Atom b(a);