]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/dot-column.cc
check for calculation-in-progress marker in get_property().
[lilypond.git] / lily / dot-column.cc
index 4683c51cb53faa05d0a0edef971ef1a2f81b9c61..b2ff0308fac19b82bd251167a4255d2698e9bcb0 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "dot-column.hh"
@@ -21,6 +21,7 @@ using namespace std;
 #include "side-position-interface.hh"
 #include "axis-group-interface.hh"
 #include "stem.hh"
+#include "grob.hh"
 #include "pointer-group-interface.hh"
 
 /*
@@ -212,6 +213,9 @@ SCM
 Dot_column::calc_positioning_done (SCM smob)
 {
   Grob *me = unsmob_grob (smob);  
+
+  me->set_property ("positioning-done", SCM_BOOL_T);
+
   vector<Grob*> dots
     = extract_grob_array (me, "dots");
 
@@ -255,6 +259,10 @@ Dot_column::calc_positioning_done (SCM smob)
        }
 
       int p = Staff_symbol_referencer::get_rounded_position (dp.dot_);
+
+      /* icky, since this should go via a Staff_symbol_referencer
+        offset callback but adding a dot overwrites Y-offset. */
+      p += (int) robust_scm2double (dp.dot_->get_property ("staff-position"), 0.0);
       dp.pos_ = p;
 
       if (dp.extremal_head_)
@@ -292,7 +300,6 @@ Dot_column::add_head (Grob *me, Grob *rh)
 }
 
 ADD_INTERFACE (Dot_column,
-              "dot-column-interface",
               
               "Groups dot objects so they form a column, and position dots so they do not "
               "clash with staff lines ",