]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/beam-engraver.cc
release: 1.5.3
[lilypond.git] / lily / beam-engraver.cc
index 4445b79643e4192f3dd68bc5a82cec6ef988014e..7b506953c8eb1904381b761bbffae8119f0462a5 100644 (file)
@@ -166,8 +166,8 @@ Beam_engraver::create_grobs ()
 
       beam_start_location_ = mp;
       beam_start_mom_ = now_mom ();
-      beam_info_p_ = new Beaming_info_list;
       
+      beam_info_p_ = new Beaming_info_list;
       
       /* urg, must copy to Auto_beam_engraver too */
  
@@ -240,6 +240,11 @@ Beam_engraver::acknowledge_grob (Grob_info info)
        }
       else if (Stem::has_interface (info.elem_l_))
        {
+         Moment now = now_mom();
+
+         if(bool (now.grace_mom_ ) != bool (beam_start_mom_.grace_mom_))
+           return ;
+         
          Item *stem_l = dynamic_cast<Item*> (info.elem_l_);
          if (Stem::beam_l (stem_l))
            return;
@@ -270,7 +275,7 @@ Beam_engraver::acknowledge_grob (Grob_info info)
 
          stem_l->set_grob_property ("duration-log",
                                    gh_int2scm (durlog));
-         Moment stem_location = now_mom () - beam_start_mom_ + beam_start_location_;
+         Moment stem_location = now - beam_start_mom_ + beam_start_location_;
          beam_info_p_->add_stem (stem_location,
  (durlog- 2) >? 1);
          Beam::add_stem (beam_p_, stem_l);