From 1f5aed8fe8907e7bdc03ffe87cf683473a4b7b46 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Fri, 6 Jul 2007 09:31:31 +1000 Subject: [PATCH] Revert "Revert "Do accidental suicide in print function."" This reverts commit 833de2880bc093623cdf1ba205ef2c8acf736ee2. --- lily/accidental.cc | 26 ++++++++------------------ lily/include/accidental-interface.hh | 1 - scm/define-grobs.scm | 5 ----- 3 files changed, 8 insertions(+), 24 deletions(-) diff --git a/lily/accidental.cc b/lily/accidental.cc index 73a1c80f36..3e5d0475f7 100644 --- a/lily/accidental.cc +++ b/lily/accidental.cc @@ -31,24 +31,6 @@ parenthesize (Grob *me, Stencil m) return m; } -/* - Hmm. Need separate callback, or perhaps #'live bool property. - */ -MAKE_SCHEME_CALLBACK (Accidental_interface, after_line_breaking, 1); -SCM -Accidental_interface::after_line_breaking (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"))) - { - me->suicide (); - } - - return SCM_UNSPECIFIED; -} /* This callback exists for the sole purpose of allowing us to override its pure equivalent to accidental-interface::pure-height */ @@ -158,7 +140,15 @@ SCM 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"))) + { + me->suicide (); + return SCM_EOL; + } + Font_metric *fm = Font_interface::get_default_font (me); SCM alist = me->get_property ("glyph-name-alist"); diff --git a/lily/include/accidental-interface.hh b/lily/include/accidental-interface.hh index 534ac706b5..a90680537f 100644 --- a/lily/include/accidental-interface.hh +++ b/lily/include/accidental-interface.hh @@ -20,7 +20,6 @@ class Accidental_interface public: DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (calc_stencils, (SCM)); - DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM)); DECLARE_SCHEME_CALLBACK (height, (SCM)); DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM)); diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index f5bdb0417f..0a9b30766f 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -24,8 +24,6 @@ (alteration . ,accidental-interface::calc-alteration) (stencil . ,ly:accidental-interface::print) (Y-extent . ,ly:accidental-interface::height) - (after-line-breaking - . ,ly:accidental-interface::after-line-breaking) (meta . ((class . Item) (interfaces . (accidental-interface font-interface)))))) @@ -37,8 +35,6 @@ (alteration . ,accidental-interface::calc-alteration) (stencil . ,ly:accidental-interface::print) (Y-extent . ,ly:accidental-interface::height) - (after-line-breaking - . ,ly:accidental-interface::after-line-breaking) (meta . ((class . Item) (interfaces . (accidental-interface font-interface)))))) @@ -125,7 +121,6 @@ (stencil . ,ly:accidental-interface::print) (Y-extent . ,ly:accidental-interface::height) (glyph-name-alist . ,standard-alteration-glyph-name-alist) - (after-line-breaking . ,ly:accidental-interface::after-line-breaking) (side-axis . ,X) (meta . ((class . Item) (interfaces . ( -- 2.39.2