]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/fingering-engraver.cc
Replace XY-offset closures with aligned_on_parent where possible
[lilypond.git] / lily / fingering-engraver.cc
index 2571ac1d709c10bec1e00df16e873877aefdbd58..b8e7d94df12bc4065e623d8b3c15b4af11306ce8 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1998--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1998--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -109,8 +109,7 @@ Fingering_engraver::make_script (Direction d, Stream_event *r, int i)
     fingerings for chords need different settings.
   */
   Side_position_interface::set_axis (fingering, Y_AXIS);
-  Self_alignment_interface::set_align_self (fingering, X_AXIS);
-  Self_alignment_interface::set_center_parent (fingering, X_AXIS);
+  Self_alignment_interface::set_aligned_on_parent (fingering, X_AXIS);
 
   // Hmm
   int priority = 200;
@@ -123,13 +122,10 @@ Fingering_engraver::make_script (Direction d, Stream_event *r, int i)
 
   fingering->set_property ("script-priority", scm_from_int (priority));
 
-  if (!is_direction (fingering->get_property_data ("direction")))
-    {
-      if (d)
-        fingering->set_property ("direction", scm_from_int (d));
-      else
-        fingering->set_property ("direction", scm_from_int (RIGHT));
-    }
+  if (d)
+    fingering->set_property ("direction", scm_from_int (d));
+  else if (!is_direction (fingering->get_property_data ("direction")))
+    fingering->set_property ("direction", scm_from_int (UP));
 
   fingerings_.push_back (fingering);
 }