]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/g-script.cc
release: 1.1.42
[lilypond.git] / lily / g-script.cc
index 867bcf7dd59ddd57ea0fe9ec67b39ce7a8c96808..d08a76800b270ba604ec917ee57bfff790a36579 100644 (file)
@@ -34,7 +34,24 @@ G_script::do_substitute_element_pointer (Score_element*o, Score_element*n)
 Molecule
 G_script::get_molecule(Direction d) const
 {
-  return lookup_l ()->afm_find ("scripts-" + indices_drul_[d]);
+  SCM s = get_elt_property (molecule_scm_sym);
+  assert  (s != SCM_BOOL_F);
+
+  s = SCM_CDR(s);
+  SCM key = SCM_CAR (s);
+  if (key == ly_symbol ("feta"))
+    {
+      return lookup_l ()->afm_find ("scripts-" +
+                                   ly_scm2string (index_cell (SCM_CDR (s), d)));
+    }
+  else if (key == ly_symbol ("accordion"))
+    {
+      return lookup_l ()->accordion (SCM_CDR(s));
+    }
+
+  else assert (false);
+
+  return Molecule ();
 }
 
 
@@ -42,7 +59,7 @@ void
 G_script::do_pre_processing ()
 {
   Graphical_element * e
-    = staff_side_l_->dim_cache_[X_AXIS].parent_l_->element_l();
+    = staff_side_l_->dim_cache_[X_AXIS]->parent_l_->element_l();
   translate_axis (e->extent (X_AXIS).center (), X_AXIS);
 }
 
@@ -59,7 +76,7 @@ G_script::set_staff_side (G_staff_side_item*g)
 {
   staff_side_l_ = g;
   add_dependency (g);
-  dim_cache_[Y_AXIS].parent_l_ = & g->dim_cache_[Y_AXIS];
+  dim_cache_[Y_AXIS]->parent_l_ = g->dim_cache_[Y_AXIS];
 }
 
 Molecule*
@@ -71,5 +88,5 @@ G_script::do_brew_molecule_p () const
 void
 G_script::do_print () const
 {
-  DOUT << "Indices: " << indices_drul_[LEFT] << ", " << indices_drul_[RIGHT];
+
 }