]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/side-position-interface.cc
Merge branch 'master' of git://git.sv.gnu.org/lilypond
[lilypond.git] / lily / side-position-interface.cc
index a3c4ca08a75a4594bb71c1f64200adac9cc56f72..c1b848bfce7370007b95f9d033c0bf0b6bb0ae6b 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <cmath>               // ceil.
 #include <algorithm>
+
 using namespace std;
 
 #include "directional-element-interface.hh"
@@ -251,7 +252,7 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
              /* In case of a ledger lines, quantize even if we're outside the staff. */
              || (Note_head::has_interface (head)
                  
-                 && abs (Staff_symbol_referencer::get_position (head)) > position))
+                 && abs (Staff_symbol_referencer::get_position (head)) > abs (position)))
            {
              o += (rounded - position) * 0.5 * ss;
              if (Staff_symbol_referencer::on_line (me, int (rounded)))
@@ -295,16 +296,21 @@ Side_position_interface::get_axis (Grob *me)
   if (scm_is_number (me->get_property ("side-axis")))
     return Axis (scm_to_int (me->get_property ("side-axis")));
   
-  me->programming_error ("side-axis not set.");
+  string msg = String_convert::form_string ("side-axis not set for grob %s.",
+                                           me->name ().c_str ());
+  me->programming_error (msg);
   return NO_AXES;
 }
 
 ADD_INTERFACE (Side_position_interface,
-              "Position a victim object (this one) next to other objects (the "
-              "support).   The property @code{direction} signifies where to put the  "
-              "victim object relative to the support (left or right, up or down?)\n\n "
-              "The routine also takes the size the staff into account if "
-              "@code{staff-padding} is set. If undefined, the staff symbol is ignored.",
+              "Position a victim object (this one) next to other objects"
+              " (the support).  The property @code{direction} signifies where"
+              " to put the victim object relative to the support (left or"
+              " right, up or down?)\n"
+              "\n"
+              "The routine also takes the size of the staff into account if"
+              " @code{staff-padding} is set.  If undefined, the staff symbol"
+              " is ignored.",
 
               /* properties */
               "direction "