]> 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 a4b13be79f1d9287746704182654780e92371036..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"
 using namespace std;
 
 #include "dots.hh"
+#include "dot-column.hh"
 #include "rhythmic-head.hh"
 #include "staff-symbol-referencer.hh"
 #include "directional-element-interface.hh"
 #include "side-position-interface.hh"
 #include "axis-group-interface.hh"
 #include "stem.hh"
+#include "grob.hh"
 #include "pointer-group-interface.hh"
 
 /*
@@ -66,6 +68,7 @@ struct Dot_position
     dot_ = 0;
     pos_ = 0;
     dir_ = CENTER;
+    extremal_head_ = false;
   }
 };
 
@@ -210,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");
 
@@ -253,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_)
@@ -290,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 ",