]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/accidental.cc
Merge branch 'master' into lilypond/translation
[lilypond.git] / lily / accidental.cc
index 402a17e99d0d5a0326e9160d218dfc36591522eb..a017cf8dea80f6af9dafee897e2fc58a141461d8 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2001--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2001--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "accidental-interface.hh"
@@ -67,7 +67,8 @@ Accidental_interface::pure_height (SCM smob, SCM start_scm, SCM)
 
   if (to_boolean (me->get_property ("forced"))
       || !unsmob_grob (me->get_object ("tie"))
-      || rank == start + 1) /* we are at the start of a line */
+      || (rank == start + 1 && /* we are at the start of a line */
+         !to_boolean (me->get_property ("hide-tied-accidental-after-break"))))
     {
       Stencil *s = unsmob_stencil (get_stencil (me));
       if (s)
@@ -109,7 +110,7 @@ Accidental_interface::accurate_boxes (Grob *me, Grob **common)
            really close.
          */
          Direction bulb_dir =
-           glyph_name=="accidentals.mirroredflat" ? LEFT : RIGHT;
+           glyph_name == "accidentals.mirroredflat" ? LEFT : RIGHT;
          stem[X_AXIS][bulb_dir] = stem[X_AXIS].center ();
 
          /*
@@ -163,8 +164,9 @@ Accidental_interface::print (SCM smob)
   Grob *me = unsmob_grob (smob);
   Grob *tie = unsmob_grob (me->get_object ("tie"));
 
-  if (tie && !tie->original ()
-      && !to_boolean (me->get_property ("forced")))
+  if (tie &&
+      (to_boolean (me->get_property ("hide-tied-accidental-after-break"))
+       || (!tie->original () && !to_boolean (me->get_property ("forced")))))
     {
       me->suicide ();
       return SCM_EOL;
@@ -189,7 +191,7 @@ Accidental_interface::get_stencil (Grob *me)
       return SCM_EOL;
     }
   
-  Stencil mol (fm->find_by_name (scm_i_string_chars (glyph_name)));
+  Stencil mol (fm->find_by_name (ly_scm2string (glyph_name)));
   if (to_boolean (me->get_property ("restore-first")))
     {
       /*
@@ -212,14 +214,15 @@ Accidental_interface::get_stencil (Grob *me)
 
   
 ADD_INTERFACE (Accidental_interface,
-              "a single accidental",
+              "A single accidental.",
               
-              /* props */
+              /* properties */
               "alteration "
               "avoid-slur "
               "forced "
+              "glyph-name-alist "
+              "hide-tied-accidental-after-break "
               "parenthesized "
               "restore-first "
-              "glyph-name-alist "
               "tie "
               );