]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/script-column.cc
Merge with master
[lilypond.git] / lily / script-column.cc
index 511efa7dce9138c51d6c8f20c654dbc60ae77823..1ae7969b4e3f84afface3e4bbe53f4057f78ad34 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "script-column.hh"
@@ -13,6 +13,7 @@
 #include "directional-element-interface.hh"
 #include "side-position-interface.hh"
 #include "warn.hh"
+#include "grob.hh"
 #include "pointer-group-interface.hh"
 
 #include <map>
@@ -132,7 +133,19 @@ Script_column::order_grobs (vector<Grob*> grobs)
        {
          Grob *g = unsmob_grob (scm_car (s));
          if (last)
-           Side_position_interface::add_support (g, last);
+           {
+             SCM outside_staff = last->get_property ("outside-staff-priority");
+             if (scm_is_number (outside_staff))
+               {
+                 /* we allow the outside-staff-priority ordering to override the
+                    script-priority ordering */
+                 if (!scm_is_number (g->get_property ("outside-staff-priority")))
+                   g->set_property ("outside-staff-priority",
+                                    scm_from_double (scm_to_double (outside_staff) + 0.1));
+               }
+             else
+               Side_position_interface::add_support (g, last);
+           }
 
          last = g;
        }