]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.111.jcn3
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 28 Nov 2000 16:02:21 +0000 (17:02 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 28 Nov 2000 16:02:21 +0000 (17:02 +0100)
1.3.111.jcn3
============

* Allow two consecutive glissandi.

CHANGES
VERSION
input/test/glissando.ly
lily/note-head-line-engraver.cc

diff --git a/CHANGES b/CHANGES
index 3663ff26cbee1220279bf8985f12bc9310c68a38..30feb218f569c85480d4399c03341d0a208fea16 100644 (file)
--- 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 12f276691554b6aba013d8a77b2bbe2b5e9f4072..7fb405ec5def1b3222151015d0cfdb0f1b5792d8 100644 (file)
--- 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.
index cdf615466443040f3f1cbfc71ac0f7dd7e9b1633..e07626c37209cdb8b354b4e900d1441fc0eb497d 100644 (file)
@@ -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,,
        }
index 9469688536d08bb42032d3bd5b63bdd259b884e4..ae21145eca4df53522e2d057096545e571fffd27 100644 (file)
@@ -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;
 }