X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpitch-scheme.cc;h=bc69b633a780dd3cb995e26ff40a91affd88719f;hb=e90f0536f9be39ada0bef0aeb0d275dec3b2fb5b;hp=1ecc247ed13911110dfccf21463d739a718d0fe3;hpb=a8c9e8a7ca320ab0df5fd32e717fd62cd7635ce6;p=lilypond.git diff --git a/lily/pitch-scheme.cc b/lily/pitch-scheme.cc index 1ecc247ed1..bc69b633a7 100644 --- a/lily/pitch-scheme.cc +++ b/lily/pitch-scheme.cc @@ -1,9 +1,20 @@ /* - pitch-scheme.cc -- implement scheme functions for Pitch + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2011 Han-Wen Nienhuys - (c) 2005--2009 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "pitch.hh" @@ -157,6 +168,10 @@ LY_DEFINE (ly_set_middle_C_x, "ly:set-middle-C!", Context *c = unsmob_context (context); int clef_pos = robust_scm2int (c->get_property ("middleCClefPosition"), 0); int offset = robust_scm2int (c->get_property ("middleCOffset"), 0); + /* middleCCuePosition overrides the clef! */ + SCM cue_pos = c->get_property ("middleCCuePosition"); + if (scm_is_number (cue_pos)) + clef_pos = robust_scm2int (cue_pos, 0); c->set_property (ly_symbol2scm ("middleCPosition"), scm_from_int (clef_pos + offset)); return SCM_UNDEFINED;