]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/auto-beam-engraver.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / auto-beam-engraver.cc
index a70755bc33a1913944329b9d75a9bbc2205184e7..5ced1d2cfef9815647a5fa0730dc2afa075c1065 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 #include "engraver.hh"
-#include "beaming.hh"
+#include "beaming-pattern.hh"
 #include "beam.hh"
 #include "stem.hh"
 #include "warn.hh"
@@ -71,10 +71,10 @@ private:
   Moment beat_length_;
 
   // We act as if beam were created, and start a grouping anyway.
-  Beaming_info_list *grouping_;
+  Beaming_pattern *grouping_;
   SCM beam_settings_;
 
-  Beaming_info_list *finished_grouping_;
+  Beaming_pattern *finished_grouping_;
 
   void check_bar_property ();
 };
@@ -211,14 +211,12 @@ Auto_beam_engraver::begin_beam ()
     }
 
   stems_ = new vector<Item*>;
-  grouping_ = new Beaming_info_list;
+  grouping_ = new Beaming_pattern ();
   beam_settings_ = updated_grob_properties (context (), ly_symbol2scm ("Beam"));
 
   beam_start_moment_ = now_mom ();
   beam_start_location_
     = robust_scm2moment (get_property ("measurePosition"), Moment (0));
-  subdivide_beams_ = ly_scm2bool (get_property ("subdivideBeams"));
-  beat_length_ = robust_scm2moment (get_property ("beatLength"), Moment (1, 4));
 }
 
 void
@@ -260,7 +258,10 @@ Auto_beam_engraver::typeset_beam ()
 {
   if (finished_beam_)
     {
-      finished_grouping_->beamify (beat_length_, subdivide_beams_);
+      if (!finished_beam_->get_bound (RIGHT))
+       finished_beam_->set_bound (RIGHT, finished_beam_->get_bound (LEFT));
+      
+      finished_grouping_->beamify (context ());
       Beam::set_beaming (finished_beam_, finished_grouping_);
       finished_beam_ = 0;