From f30b976e93c7b865871364d915e63b33d289e401 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 28 Nov 2000 17:02:21 +0100 Subject: [PATCH] patch::: 1.3.111.jcn3 1.3.111.jcn3 ============ * Allow two consecutive glissandi. --- CHANGES | 5 ++++ VERSION | 2 +- input/test/glissando.ly | 4 +-- lily/note-head-line-engraver.cc | 50 ++++++++++++++++++--------------- 4 files changed, 35 insertions(+), 26 deletions(-) diff --git a/CHANGES b/CHANGES index 3663ff26cb..30feb218f5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +1.3.111.jcn3 +============ + +* Allow two consecutive glissandi. + 1.3.111.jcn2 ============ diff --git a/VERSION b/VERSION index 12f2766915..7fb405ec5d 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=111 -MY_PATCH_LEVEL=jcn2 +MY_PATCH_LEVEL=jcn3 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/test/glissando.ly b/input/test/glissando.ly index cdf6154664..e07626c372 100644 --- a/input/test/glissando.ly +++ b/input/test/glissando.ly @@ -1,9 +1,7 @@ \score{ < \context Staff=one \notes\relative c''{ - a \glissando e' - % test: link thread to other staff - a, \glissando + a \glissando e' \glissando a, \glissando \translator Staff=two a,, } diff --git a/lily/note-head-line-engraver.cc b/lily/note-head-line-engraver.cc index 9469688536..ae21145eca 100644 --- a/lily/note-head-line-engraver.cc +++ b/lily/note-head-line-engraver.cc @@ -15,7 +15,6 @@ #include "side-position-interface.hh" #include "staff-symbol-referencer.hh" #include "translator-group.hh" -#include "protected-scm.hh" /** Create line-spanner grobs for glissandi (and possibly other) lines @@ -37,8 +36,9 @@ protected: private: Spanner* line_; Request* req_; - Protected_scm heads_; + Request* last_req_; Translator* last_staff_; + Grob* head_; Grob* last_head_; }; @@ -46,7 +46,8 @@ Note_head_line_engraver::Note_head_line_engraver () { line_ = 0; req_ = 0; - heads_ = SCM_EOL; + last_req_ = 0; + head_ = 0; last_head_ = 0; last_staff_ = 0; } @@ -70,20 +71,18 @@ Note_head_line_engraver::acknowledge_grob (Grob_info info) { if (Rhythmic_head::has_interface (info.elem_l_)) { - if (req_) - heads_ = gh_cons (info.elem_l_->self_scm (), heads_); - else if (to_boolean (get_property ("followThread"))) + last_head_ = head_; + head_ = info.elem_l_; + if (to_boolean (get_property ("followThread"))) { Translator* staff = daddy_trans_l_ && daddy_trans_l_->daddy_trans_l_ ? daddy_trans_l_->daddy_trans_l_->daddy_trans_l_ : 0; if (staff != last_staff_) { if (last_head_) - heads_ = gh_list (info.elem_l_->self_scm (), - last_head_->self_scm (), SCM_UNDEFINED); + last_req_ = (Request*)1; // ugh last_staff_ = staff; } - last_head_ = info.elem_l_; } } } @@ -91,22 +90,26 @@ Note_head_line_engraver::acknowledge_grob (Grob_info info) void Note_head_line_engraver::create_grobs () { - if (!line_ && scm_ilength (heads_) > 1) + if (!line_ && last_req_ && last_head_ && head_) { /* type Glissando? */ line_ = new Spanner (get_property ("NoteHeadLine")); - line_->set_bound (LEFT, unsmob_grob (gh_car (heads_))); - line_->set_bound (RIGHT, unsmob_grob (ly_last (heads_))); - - line_->set_parent (unsmob_grob (gh_car (heads_)), X_AXIS); - line_->set_parent (unsmob_grob (gh_car (heads_)), Y_AXIS); - - line_->set_parent (unsmob_grob (ly_last (heads_)), X_AXIS); - line_->set_parent (unsmob_grob (ly_last (heads_)), Y_AXIS); - - announce_grob (line_, req_); - req_ = 0; - heads_ = SCM_EOL; + line_->set_bound (LEFT, head_); + line_->set_bound (RIGHT, last_head_); + + line_->set_parent (head_, X_AXIS); + line_->set_parent (head_, Y_AXIS); + + line_->set_parent (last_head_, X_AXIS); + line_->set_parent (last_head_, Y_AXIS); + + if ((int)last_req_ == 1) // ugh + last_req_ = 0; + + announce_grob (line_, last_req_); + last_req_ = 0; + last_head_ = head_; + head_ = 0; } } @@ -118,6 +121,9 @@ Note_head_line_engraver::stop_translation_timestep () typeset_grob (line_); line_ = 0; } + if (req_) + last_req_ = req_; + req_ = 0; } -- 2.39.5