]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/dots-engraver.cc
Merge branch 'dev/kainhofer' of ssh://kainhofer@git.sv.gnu.org/srv/git/lilypond into...
[lilypond.git] / lily / dots-engraver.cc
index 1b34354e43e755354dea27365f352abc399d0bf5..b59a8d9a41d65dc3a5c1d288c8f9f310b2eb0cf6 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 2006 Han-Wen Nienhuys <hanwen@lilypond.org>
+  (c) 2006--2007 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 ()
@@ -37,27 +37,27 @@ Dots_engraver::acknowledge_rhythmic_head (Grob_info gi)
   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_ACKNOWLEDGER (Dots_engraver, rhythmic_head);
 
-ADD_TRANSLATOR(Dots_engraver,
+ADD_TRANSLATOR (Dots_engraver,
               "Create @ref{Dots} objects for @ref{rhythmic-head-interface}s.",
 
               /* create */
               "Dots ",
 
-              /*acc*/
-              "",
-
               /*r*/
               "" ,