]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lilypond-key.cc
(apply_tweaks): new function. Run tweaks on all
[lilypond.git] / lily / lilypond-key.cc
index 0cb7652413c6699d0082ed9b8374d63b1ae9e5fe..6dc69be030f790aea8ab6c7aa0c912048304a86e 100644 (file)
@@ -78,7 +78,7 @@ Lilypond_grob_key::from_scheme (SCM a)
   return new Lilypond_grob_key (unsmob_key (scm_car (a)),
                                *unsmob_moment (scm_cadr (a)),
                                ly_scm2string  (scm_caddr (a)),
-                               scm_to_int (scm_cadddr (a)));
+                               scm_to_int  (scm_list_ref (a, scm_from_int (3))));
 }
 
 
@@ -163,10 +163,11 @@ Lilypond_context_key::as_scheme () const
 Object_key *
 Lilypond_context_key::from_scheme (SCM a) 
 {
-  return new Lilypond_grob_key (unsmob_key (scm_car (a)),
-                               *unsmob_moment (scm_cadr (a)),
-                               ly_scm2string  (scm_list_ref (a, scm_from_int (2))),
-                               scm_to_int  (scm_list_ref (a, scm_from_int (3))));
+  return new Lilypond_context_key (unsmob_key (scm_car (a)),
+                                  *unsmob_moment (scm_cadr (a)),
+                                  ly_scm2string  (scm_list_ref (a, scm_from_int (2))),
+                                  ly_scm2string  (scm_list_ref (a, scm_from_int (3))),
+                                  scm_to_int  (scm_list_ref (a, scm_from_int (4))));
 }
 
 
@@ -212,7 +213,6 @@ Lilypond_general_key::do_compare (Object_key const* key)const
   if (c)
     return c;
 
-  
   c = sign (disambiguation_count_ - other->disambiguation_count_);
   if (c)
     return c;