X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fnew-dynamic-engraver.cc;h=749f9aaa164c496b4c9267df920f13db75ba9cdc;hb=a05f969a271be91554e3b1525aa3035b0f8c0f32;hp=3554b22e9ee00a290fabdf0c47eb8245e3e5f74a;hpb=4bb29573149a0ffa1f881c5e38a0fe68e9e76b67;p=lilypond.git diff --git a/lily/new-dynamic-engraver.cc b/lily/new-dynamic-engraver.cc index 3554b22e9e..749f9aaa16 100644 --- a/lily/new-dynamic-engraver.cc +++ b/lily/new-dynamic-engraver.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2008--2011 Han-Wen Nienhuys + Copyright (C) 2008--2012 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -242,7 +242,7 @@ string New_dynamic_engraver::get_spanner_type (Stream_event *ev) { string type; - SCM start_sym = ev->get_property ("class"); + SCM start_sym = scm_car (ev->get_property ("class")); if (start_sym == ly_symbol2scm ("decrescendo-event")) type = "decrescendo"; @@ -260,6 +260,7 @@ New_dynamic_engraver::acknowledge_note_column (Grob_info info) if (script_ && !script_->get_parent (X_AXIS)) { extract_grob_set (info.grob (), "note-heads", heads); + Grob *stem = unsmob_grob (info.grob ()->get_object ("stem")); /* Spacing constraints may require dynamics to be aligned on rests, so check for a rest if this note column has no note heads. @@ -271,7 +272,10 @@ New_dynamic_engraver::acknowledge_note_column (Grob_info info) { script_->set_parent (x_parent, X_AXIS); Self_alignment_interface::set_center_parent (script_, X_AXIS); + Self_alignment_interface::avoid_x_collisions (script_); } + if (stem) + Pointer_group_interface::add_grob (script_, ly_symbol2scm ("potential-X-colliding-grobs"), stem); } if (current_spanner_ && !current_spanner_->get_bound (LEFT))