/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2014--2014 Janek Warchoł <lemniskata.bernoullego@gmail.com>
+ Copyright (C) 2014--2015 Janek Warchoł <lemniskata.bernoullego@gmail.com>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Grob *me = Grob::unsmob (smob);
Grob *clef = me->get_parent (X_AXIS);
string full_clef_name = ly_scm2string (clef->get_property ("glyph"));
-
- int separator_position = full_clef_name.find ('.');
- string clef_type = full_clef_name.substr (separator_position + 1,
- separator_position + 2);
+ string clef_name = replace_all(&full_clef_name, "clefs.", "");
// find entry with keyname clef_type in clef-alignments
- SCM alist_entry = scm_assq (ly_symbol2scm (clef_type.c_str ()),
+ SCM alist_entry = scm_assq (ly_symbol2scm (clef_name.c_str ()),
me->get_property ("clef-alignments"));
if (scm_is_pair (alist_entry))