X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fside-position-interface.cc;h=c1b848bfce7370007b95f9d033c0bf0b6bb0ae6b;hb=5b6e9e92849785962a1b1831eeef20e12af5d2d5;hp=a3c4ca08a75a4594bb71c1f64200adac9cc56f72;hpb=07ea6396c855b6140d1e5b111a4aa7ee2aa7e5cf;p=lilypond.git diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index a3c4ca08a7..c1b848bfce 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -10,6 +10,7 @@ #include // ceil. #include + 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 "