]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/dots-engraver.cc
Run `make grand-replace'.
[lilypond.git] / lily / dots-engraver.cc
index 1b34354e43e755354dea27365f352abc399d0bf5..dba6fe6822d3099cb35bc0519f8446ea065c8890 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 2006 Han-Wen Nienhuys <hanwen@lilypond.org>
+  (c) 2006--2008 Han-Wen Nienhuys <hanwen@lilypond.org>
   
 */
 
@@ -18,8 +18,8 @@
 
 class Dots_engraver : public Engraver 
 {
-  DECLARE_ACKNOWLEDGER(rhythmic_head);
-  TRANSLATOR_DECLARATIONS(Dots_engraver);
+  DECLARE_ACKNOWLEDGER (rhythmic_head);
+  TRANSLATOR_DECLARATIONS (Dots_engraver);
 };
 
 Dots_engraver::Dots_engraver ()
@@ -36,30 +36,31 @@ Dots_engraver::acknowledge_rhythmic_head (Grob_info gi)
   Grob *note = gi.grob ();
   if (unsmob_grob (note->get_object ("dot")))
     return;
-
-  Duration dur = *unsmob_duration (cause->get_property ("duration"));
-  if (dur.dot_count ())
+  
+  Duration *dur = unsmob_duration (cause->get_property ("duration"));
+  if (dur && dur->dot_count ())
     {
       Item *d = make_item ("Dots", note->self_scm ());
       Rhythmic_head::set_dots (note, d);
+
+      d->set_property ("dot-count", scm_from_int (dur->dot_count ()));
       d->set_parent (note, Y_AXIS);
     }
 }
 
 
-ADD_ACKNOWLEDGER(Dots_engraver, rhythmic_head);
-
-ADD_TRANSLATOR(Dots_engraver,
-              "Create @ref{Dots} objects for @ref{rhythmic-head-interface}s.",
+ADD_ACKNOWLEDGER (Dots_engraver, rhythmic_head);
 
-              /* create */
-              "Dots ",
+ADD_TRANSLATOR (Dots_engraver,
+               "Create @ref{Dots} objects for"
+               " @ref{rhythmic-head-interface}s.",
 
-              /*acc*/
-              "",
+               /* create */
+               "Dots ",
 
-              /*r*/
-              "" ,
+               /* read */
+               "",
               
-              /*w*/
-              "");
+               /* write */
+               ""
+               );