X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flocal-key-item.cc;h=52e7a65f775b03f063d2b9eab60c4a94ee80c07b;hb=0817e0513d1016ff22a633b6fee20ddba2a062f2;hp=1ffc2c696cca0a6d7d975b351bb981b1c210c412;hpb=dfe0c6ad15227d6d3646bd7445df5de6aa386ff7;p=lilypond.git diff --git a/lily/local-key-item.cc b/lily/local-key-item.cc index 1ffc2c696c..52e7a65f77 100644 --- a/lily/local-key-item.cc +++ b/lily/local-key-item.cc @@ -171,8 +171,20 @@ Local_key_item::brew_molecule (SCM smob) oct_b = true; } + lastoct = p.octave_i () ; + bool cautionary = (scm_memq (ly_symbol2scm ("cautionary"), opts) != SCM_BOOL_F); + SCM font_rel_siz = me->get_grob_property("font-relative-size"); + SCM caut_siz = me->get_grob_property("cautionary-size"); + int frs = (gh_exact_p(font_rel_siz) ? gh_scm2int(font_rel_siz) : 0); + int cs = (gh_exact_p(caut_siz) ? gh_scm2int(caut_siz) : 0); + + + // Ugh. This will only work if only called once on each grob. --rz + if (cautionary && caut_siz!=0) + me->set_grob_property ("font-relative-size",gh_int2scm(frs+cs)); + SCM c0 = me->get_grob_property ("c0-position"); Real dy = (gh_number_p (c0) ? gh_scm2int (c0) : 0 + p.notename_i_) * note_distance; @@ -189,8 +201,8 @@ Local_key_item::brew_molecule (SCM smob) acc.add_at_edge (X_AXIS, LEFT, Molecule (prefix), 0); } - if (scm_memq (ly_symbol2scm ("cautionary"), opts) != SCM_BOOL_F) - acc = parenthesize (me, acc); + if (cautionary && to_boolean(me->get_grob_property("paren-cautionaries"))) + acc = parenthesize (me, acc); acc.translate_axis (dy, Y_AXIS); octave_mol.add_at_edge (X_AXIS, RIGHT, acc, 0);