X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fglissando-engraver.cc;h=40151c29430ed5c74dff02300666c840b7ca2b0f;hb=9e781b7dc83b60a543ce218aa1a5f139f74c760f;hp=38270f446f79f0571021b11ff99683185f1e6ba6;hpb=4bb29573149a0ffa1f881c5e38a0fe68e9e76b67;p=lilypond.git diff --git a/lily/glissando-engraver.cc b/lily/glissando-engraver.cc index 38270f446f..40151c2943 100644 --- a/lily/glissando-engraver.cc +++ b/lily/glissando-engraver.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2000--2011 Jan Nieuwenhuizen + Copyright (C) 2000--2014 Jan Nieuwenhuizen 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 lines_; vector kill_me_; - bool start_glissandi; - bool stop_glissandi; + bool start_glissandi_; + bool stop_glissandi_; Stream_event *event_; vector 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; }