]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/glissando-engraver.cc
Run grand-replace (issue 3765)
[lilypond.git] / lily / glissando-engraver.cc
index 38270f446f79f0571021b11ff99683185f1e6ba6..40151c29430ed5c74dff02300666c840b7ca2b0f 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2000--2011 Jan Nieuwenhuizen <janneke@gnu.org>
+  Copyright (C) 2000--2014 Jan Nieuwenhuizen <janneke@gnu.org>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -45,8 +45,8 @@ protected:
 private:
   vector<Spanner *> lines_;
   vector<Spanner *> kill_me_;
-  bool start_glissandi;
-  bool stop_glissandi;
+  bool start_glissandi_;
+  bool stop_glissandi_;
 
   Stream_event *event_;
   vector<vsize> note_column_1;
@@ -56,8 +56,8 @@ private:
 Glissando_engraver::Glissando_engraver ()
 {
   event_ = 0;
-  start_glissandi = false;
-  stop_glissandi = false;
+  start_glissandi_ = false;
+  stop_glissandi_ = false;
 }
 
 IMPLEMENT_TRANSLATOR_LISTENER (Glissando_engraver, glissando);
@@ -71,14 +71,17 @@ void
 Glissando_engraver::process_music ()
 {
   if (event_)
-    start_glissandi = true;
+    start_glissandi_ = true;
 }
 
 void
 Glissando_engraver::acknowledge_note_column (Grob_info info)
 {
   Grob *g = info.grob ();
-  if (stop_glissandi)
+  if (to_boolean (g->get_property ("glissando-skip")))
+    return;
+
+  if (stop_glissandi_)
     {
       extract_grob_set (g, "note-heads", note_heads);
       int glissando_index = 0;
@@ -100,10 +103,10 @@ Glissando_engraver::acknowledge_note_column (Grob_info info)
       lines_.clear ();
       note_column_1.clear ();
       note_column_2.clear ();
-      stop_glissandi = false;
+      stop_glissandi_ = false;
     }
 
-  if (start_glissandi)
+  if (start_glissandi_)
     {
       extract_grob_set (g, "note-heads", note_heads);
       SCM map = get_property ("glissandoMap");
@@ -121,7 +124,7 @@ Glissando_engraver::acknowledge_note_column (Grob_info info)
               continue;
             int n1 = robust_scm2int (scm_car (candidate), -1);
             int n2 = robust_scm2int (scm_cdr (candidate), -1);
-            if (n1 < 0 || n2 < 0 || n1 >= note_heads.size ())
+            if ((n1 < 0) || (n2 < 0) || (size_t (n1) >= note_heads.size ()))
               continue;
             note_column_1.push_back (vsize (n1));
             note_column_2.push_back (vsize (n2));
@@ -137,13 +140,12 @@ Glissando_engraver::acknowledge_note_column (Grob_info info)
 void
 Glissando_engraver::stop_translation_timestep ()
 {
-
-  if (start_glissandi)
+  if (start_glissandi_)
     {
-      if (stop_glissandi)
+      if (stop_glissandi_)
         programming_error ("overwriting glissando");
-      stop_glissandi = true;
-      start_glissandi = false;
+      stop_glissandi_ = true;
+      start_glissandi_ = false;
     }
   event_ = 0;
 }