]> git.donarmstrong.com Git - lilypond.git/commitdiff
Set side-axis for InstrumentSwitch grobs
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 26 Feb 2008 17:50:05 +0000 (18:50 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Wed, 27 Feb 2008 14:59:31 +0000 (15:59 +0100)
InstrumentSwitch was missing a setting for side-axis, which
caused a not very helpful warning "side-axis not set." on the
command line.
I now added the side-axis setting for the InstrumentSwitch and
also changed the warning message to include the type of grob
for which the setting is missing.

Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
lily/side-position-interface.cc
scm/define-grobs.scm

index bffcf98426f727b79f1613a10b9b67a4b7a62ee4..a289aea5b3d136e20211a12cfd3a8a4978e58932 100644 (file)
@@ -296,7 +296,9 @@ 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;
 }
 
index 564b51d01d15937c332011d9e9a866de964b9a0f..14f57fedd65e861d817cf24a2ca9edaa584f6f0d 100644 (file)
        (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
        (staff-padding . 2)
        (direction . ,UP)
+       (side-axis . ,Y)
        (self-alignment-X . ,CENTER)
        (meta . ((class . Item)
                 (interfaces . (side-position-interface