X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flocal-key-item.cc;h=7541177600ffa58bb77430b695391c3330b07d84;hb=bb36bac02a64770871780231ecc709cb18b20932;hp=72c7104e4abfdf3e856242bbf8937dafbac11e5e;hpb=163503e56aa0c03d41d37fd083bdb96a6a473a11;p=lilypond.git diff --git a/lily/local-key-item.cc b/lily/local-key-item.cc index 72c7104e4a..7541177600 100644 --- a/lily/local-key-item.cc +++ b/lily/local-key-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "local-key-item.hh" #include "molecule.hh" @@ -17,7 +17,6 @@ Local_key_item::Local_key_item () { - c0_position_i_ = 0; } void @@ -69,7 +68,7 @@ Local_key_item::do_brew_molecule_p() const { Molecule*output = new Molecule; Staff_symbol_referencer_interface si (this); - Real note_distance = si.staff_line_leading_f ()/2; + Real note_distance = si.staff_space ()/2; Molecule *octave_mol_p = 0; int lastoct = -100; @@ -90,13 +89,14 @@ Local_key_item::do_brew_molecule_p() const } lastoct = p.octave_i_; - Real dy = - (c0_position_i_ + p.notename_i_) + + SCM c0 = get_elt_property ("c0-position"); + Real dy = (gh_number_p (c0) ? gh_scm2int (c0) : 0 + p.notename_i_) * note_distance; Molecule m (accidental (p.accidental_i_, - accidental_arr_[i].cautionary_b_, - accidental_arr_[i].natural_b_)); + accidental_arr_[i].cautionary_b_, + accidental_arr_[i].natural_b_)); m.translate_axis (dy, Y_AXIS); octave_mol_p->add_at_edge (X_AXIS, RIGHT, m, 0);