]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-column.cc
release: 0.1.63
[lilypond.git] / lily / note-column.cc
index fb70c3e7a65dada41e3dfa344692064b031da6c4..e528b9e956369d94ace5744e9f76161ee7745808 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 #include "dot-column.hh"
 #include "note-column.hh"
@@ -43,6 +43,15 @@ Note_column::head_positions_interval() const
 
 }
 
+Interval 
+Note_column::width () const
+{
+  if (head_l_arr_.size ())
+    return head_l_arr_[0]->width ();
+  else
+    return Interval (0,0);
+}
+
 void
 Note_column::do_pre_processing()
 {
@@ -68,12 +77,10 @@ Note_column::set (Stem * stem_l)
   stem_l_ = stem_l;
   /* 
      don't add stem to support; mostly invisible for rest-columns (and possibly taken . .)
-    
    */
   Score_elem::add_dependency (stem_l);
   for (int i=0; i < script_l_arr_.size(); i++)
     script_l_arr_[i]->set_stem (stem_l);
-
 }
 
 void
@@ -125,6 +132,7 @@ Note_column::add (Rhythmic_head *h)
 void
 Note_column::translate_rests (int dy_i)
 {
+  invalidate_cache (Y_AXIS);
   for (int i=0; i < rest_l_arr_.size(); i++)
     rest_l_arr_[i]->position_i_ += dy_i;
 }