X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Faccidental.cc;h=bd5721f66ea5abef59482b04c427e284d8014320;hb=b7a0cffbf9d1069860368f289a5b50e9d1d90ba8;hp=c91152522846c48284b9b9cf9cb55ff5c758e40a;hpb=41e45dd730c075e78065dfa78e5e54be664d905e;p=lilypond.git diff --git a/lily/accidental.cc b/lily/accidental.cc index c911525228..bd5721f66e 100644 --- a/lily/accidental.cc +++ b/lily/accidental.cc @@ -1,9 +1,20 @@ /* - accidental.cc -- implement Accidental_interface + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2001--2009 Han-Wen Nienhuys - (c) 2001--2007 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "accidental-interface.hh" @@ -67,7 +78,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 +121,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 +175,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 +202,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"))) { /* @@ -218,8 +231,9 @@ ADD_INTERFACE (Accidental_interface, "alteration " "avoid-slur " "forced " + "glyph-name-alist " + "hide-tied-accidental-after-break " "parenthesized " "restore-first " - "glyph-name-alist " "tie " );