From: Valentin Villenave Date: Sun, 13 Jan 2008 18:01:45 +0000 (+0100) Subject: fix input regression cluster cross-staff.ly X-Git-Tag: release/2.11.38-1~89 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f270fa5302a3d084f8f0a897403efca46f2e15ec;p=lilypond.git fix input regression cluster cross-staff.ly --- diff --git a/lily/cluster.cc b/lily/cluster.cc index 7a84195493..c4b11b38c5 100644 --- a/lily/cluster.cc +++ b/lily/cluster.cc @@ -111,6 +111,18 @@ brew_cluster_piece (Grob *me, vector bottom_points, vector top_p return out; } +MAKE_SCHEME_CALLBACK (Cluster, calc_cross_staff, 1); +SCM +Cluster::calc_cross_staff (SCM smob) +{ + Grob *me = unsmob_grob (smob); + + extract_grob_set (me, "columns", cols); + Grob *commony = common_refpoint_of_array (cols, me, Y_AXIS); + + return scm_from_bool (commony != me->get_parent (Y_AXIS)); +} + MAKE_SCHEME_CALLBACK (Cluster, print, 1); SCM Cluster::print (SCM smob) diff --git a/lily/include/cluster.hh b/lily/include/cluster.hh index 3081b1b093..e15d002414 100644 --- a/lily/include/cluster.hh +++ b/lily/include/cluster.hh @@ -16,6 +16,7 @@ class Cluster { public: DECLARE_SCHEME_CALLBACK (print, (SCM)); + DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM)); DECLARE_GROB_INTERFACE(); }; diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 800362eb92..658d2dfeb0 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -486,6 +486,7 @@ (stencil . ,ly:cluster::print) (minimum-length . 0.0) (padding . 0.25) + (cross-staff . ,ly:cluster::calc-cross-staff) (style . ramp) (meta . ((class . Spanner) (interfaces . (cluster-interface))))))