]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/script-engraver.cc
release: 1.3.13
[lilypond.git] / lily / script-engraver.cc
index b96f3b046529ffaf72bc2b69baf488f309047c9a..65317776bbc7e51782b05f665d18a531618e12ee 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "script-engraver.hh"
 #include "script.hh"
-#include "staff-side.hh"
+#include "side-position-interface.hh"
 #include "musical-request.hh"
 #include "stem.hh"
 #include "staff-symbol.hh"
@@ -50,20 +50,21 @@ Script_engraver::do_process_requests()
          continue;
        }
       Script *p =new Script;
-      Side_position_interface stafy (p); 
+      Side_position_interface stafy (p);
+      
       
       list = gh_cdr (list);
       p->set_elt_property ("molecule",
-                          SCM_CAR(list));
+                          gh_car (list));
 
-      list = SCM_CDR(list);
-      bool follow_staff = gh_scm2bool (SCM_CAR(list));
-      list = SCM_CDR(list);
-      int relative_stem_dir = gh_scm2int (SCM_CAR(list));
-      list = SCM_CDR(list);
-      int force_dir =gh_scm2int (SCM_CAR(list));
-      list = SCM_CDR(list);
-      SCM priority = SCM_CAR(list);
+      list = gh_cdr(list);
+      bool follow_staff = gh_scm2bool (gh_car (list));
+      list = gh_cdr(list);
+      int relative_stem_dir = gh_scm2int (gh_car (list));
+      list = gh_cdr(list);
+      int force_dir =gh_scm2int (gh_car (list));
+      list = gh_cdr(list);
+      SCM priority = gh_car (list);
 
       
       if (relative_stem_dir)
@@ -75,14 +76,18 @@ Script_engraver::do_process_requests()
        stafy.set_direction (l->get_direction ());
 
       SCM axisprop = get_property ("scriptHorizontal",0);
-      if (gh_boolean_p (axisprop) && gh_scm2bool (axisprop))
+      bool xaxis = gh_boolean_p (axisprop) && gh_scm2bool (axisprop);
+      if (xaxis)
        stafy.set_axis (X_AXIS);
       else
        stafy.set_axis (Y_AXIS);
       
-      if (follow_staff && !gh_boolean_p (axisprop) && gh_scm2bool (axisprop))
-       p->set_elt_property ("no-staff-support", SCM_BOOL_T);
+      if (!follow_staff && ! xaxis)
+       p->set_elt_property ("staff-support", SCM_BOOL_T);
 
+      if (!xaxis && follow_staff)
+       stafy.set_quantised (Y_AXIS);
+      
       p->set_elt_property ("script-priority", priority);
   
       script_p_arr_.push (p);