]> git.donarmstrong.com Git - lilypond.git/commitdiff
(acknowledge_grob): only center on
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 2 Jun 2005 11:35:53 +0000 (11:35 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 2 Jun 2005 11:35:53 +0000 (11:35 +0000)
parent if we have a notehead. Fixes incorrect offsets when
Paper_column is very wide in the X direction.

ChangeLog
lily/dynamic-engraver.cc
scm/define-grobs.scm

index ae61a5a82232240ff3f9612bd27fe2bf6c5ca64f..3261d19731c208d7d866f2d0b830e52db1759061 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2005-06-02  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/dynamic-engraver.cc (acknowledge_grob): only center on
+       parent if we have a notehead. Fixes incorrect offsets when
+       Paper_column is very wide in the X direction.
+
        * input/regression/font-family-override.ly (Module): new file.
 
        * scm/font.scm (make-pango-font-tree): new function.
index 5e1cbc9754bf21e32d02a6323a3508712356c4fa..ab120ab46dd8c45ab2945dc35f0c8b2b06526b9e 100644 (file)
@@ -19,6 +19,7 @@
 #include "side-position-interface.hh"
 #include "staff-symbol-referencer.hh"
 #include "warn.hh"
+#include "self-alignment-interface.hh"
 
 /*
   TODO:
@@ -270,6 +271,7 @@ Dynamic_engraver::stop_translation_timestep ()
       finished_line_spanner_ = line_spanner_;
       line_spanner_ = 0;
     }
+  
   typeset_all ();
 
   if (cresc_ && !cresc_->get_bound (LEFT))
@@ -382,7 +384,12 @@ Dynamic_engraver::acknowledge_grob (Grob_info info)
        {
          SCM head = scm_last_pair (info.grob ()->get_property ("note-heads"));
          if (scm_is_pair (head))
-           script_->set_parent (unsmob_grob (scm_car (head)), X_AXIS);
+           {
+             script_->set_parent (unsmob_grob (scm_car (head)), X_AXIS);
+             script_->add_offset_callback (Self_alignment_interface::centered_on_parent_proc,
+                                           X_AXIS);
+
+           }
        }
 
       if (cresc_)
index fc5be554fe6beaa62dd646a28e4ff4be942af8cc..eee6d11c2ea9846843a8243518a4a2139eba4317 100644 (file)
      . (
        (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
        (print-function . ,Text_interface::print)
-       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
-                              ,Self_alignment_interface::centered_on_parent))
+       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
        (self-alignment-X . 0)
        (no-spacing-rods . #t)
        (script-priority . 100)