summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@xs4all.nl>2006-10-29 00:16:01 +0200
committerHan-Wen Nienhuys <hanwen@xs4all.nl>2006-10-29 00:16:01 +0200
commitc3153e5513e6b0ccdc226fbedd6e886d7df23a25 (patch)
treeb09c847fad4953f75abdd67a415060c0069a3ecf
parent486771676495c9ac49f820ee449b20450541595a (diff)
add breakableSeparationItem to extra encompass for slurs. This fixes
slur/clef slur/key collisions etc. Should fix #49
-rw-r--r--.gitignore1
-rw-r--r--Documentation/topdocs/NEWS.tely6
-rw-r--r--input/regression/slur-clef.ly6
-rw-r--r--lily/separating-group-spanner.cc2
-rw-r--r--lily/slur-engraver.cc16
-rw-r--r--lily/slur-scoring.cc1
-rw-r--r--scm/define-grobs.scm1
7 files changed, 31 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 849b7705d3..6a3858d251 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@ TAGS
tags
.gdbinit
?.ly
+*.midi
diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely
index 33f3510055..c8ee8888d5 100644
--- a/Documentation/topdocs/NEWS.tely
+++ b/Documentation/topdocs/NEWS.tely
@@ -66,6 +66,12 @@ which scares away people.
@end ignore
+@item Slurs now avoid clefs and key changes.
+
+@lilypond[fragment,ragged-right]
+\new Staff { \clef bass c^( \clef "G" g') }
+@end lilypond
+
@item The @code{FretBoards} context will generate guitar frettings
automatically,
diff --git a/input/regression/slur-clef.ly b/input/regression/slur-clef.ly
new file mode 100644
index 0000000000..0b878838ac
--- /dev/null
+++ b/input/regression/slur-clef.ly
@@ -0,0 +1,6 @@
+\paper {
+ ragged-right = ##t
+ }
+\version "2.9.27"
+
+\new Staff { \clef bass c^( \clef "G" g') }
diff --git a/lily/separating-group-spanner.cc b/lily/separating-group-spanner.cc
index 5ef9038dfb..14e457b6ef 100644
--- a/lily/separating-group-spanner.cc
+++ b/lily/separating-group-spanner.cc
@@ -115,4 +115,4 @@ ADD_INTERFACE (Separating_group_spanner, "separation-spanner-interface",
/* properties */
"elements "
- "padding");
+ "padding ");
diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc
index c203d4602d..864ea77473 100644
--- a/lily/slur-engraver.cc
+++ b/lily/slur-engraver.cc
@@ -196,6 +196,17 @@ Slur_engraver::process_music ()
void
Slur_engraver::stop_translation_timestep ()
{
+ if (Grob *g = unsmob_grob (get_property ("breakableSeparationItem")))
+ {
+ for (vsize i = 0; i < end_slurs_.size (); i++)
+ Slur::add_extra_encompass (end_slurs_[i], g);
+
+ if (!events_[START])
+ for (vsize i = 0; i < slurs_.size (); i++)
+ Slur::add_extra_encompass (slurs_[i], g);
+ }
+
+
for (vsize i = 0; i < end_slurs_.size (); i++)
announce_end_grob (end_slurs_[i], SCM_EOL);
end_slurs_.clear ();
@@ -213,5 +224,8 @@ ADD_ACKNOWLEDGER (Slur_engraver, tuplet_number);
ADD_TRANSLATOR (Slur_engraver,
/* doc */ "Build slur grobs from slur events",
/* create */ "Slur",
- /* read */ "slurMelismaBusy doubleSlurs",
+ /* read */
+ "slurMelismaBusy "
+ "doubleSlurs ",
+
/* write */ "");
diff --git a/lily/slur-scoring.cc b/lily/slur-scoring.cc
index 6371082b07..6b4b569911 100644
--- a/lily/slur-scoring.cc
+++ b/lily/slur-scoring.cc
@@ -529,6 +529,7 @@ Slur_score_state::get_base_attachments () const
x = robust_relative_extent (extremes_[d].bound_, common_[X_AXIS], X_AXIS)[d];
else
x = slur_->get_broken_left_end_align ();
+
Grob *col = (d == LEFT) ? columns_[0] : columns_.back ();
if (extremes_[-d].bound_ != col)
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm
index a1d205c09e..37277a762a 100644
--- a/scm/define-grobs.scm
+++ b/scm/define-grobs.scm
@@ -1351,6 +1351,7 @@
(SeparationItem
. (
+ (avoid-slur . inside)
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:axis-group-interface::height)
(meta . ((class . Item)