]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/text-item.cc
release: 1.1.9
[lilypond.git] / lily / text-item.cc
index c23b63c9a575b69921a157f3beda7351e1ea01de..b6252548673cafea2353d7422e8d9625db60e54a 100644 (file)
@@ -38,9 +38,11 @@ Real
 Text_item::get_position_f () const
 {
   // uhuh, tdef/gdef?
-  if ( (tdef_p_->name () != Text_def::static_name ()) 
-    || ( ( (Text_def*)tdef_p_)->style_str_ != "finger"))
-    return Staff_side::get_position_f ();
+  if (Text_def *tdl = dynamic_cast<Text_def*>(tdef_p_))
+    {
+      if (tdl->style_str_ != "finger") // HUHH?
+       return Staff_side::get_position_f ();
+    }
 
   if (!dir_)
     {
@@ -71,12 +73,13 @@ Text_item::brew_molecule_p () const
   Molecule* mol_p = new Molecule (a);
 
   if (dir_<0)          // should do something better anyway.
-    mol_p->translate_axis (-mol_p->extent ().y ().left , Y_AXIS);
+    mol_p->translate_axis (mol_p->extent ().y ().left , Y_AXIS);
   mol_p->translate_axis (coordinate_offset_f_, Y_AXIS);
+  // fine for one lyric, urg for lyric chord
+  mol_p->translate_axis (a.dim_.y ().length (), Y_AXIS);
 
-  
   return mol_p;
 }
 
 
-IMPLEMENT_IS_TYPE_B1 (Text_item,Item);
+