]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/system-start-text.cc
Merge branch 'jneeman' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond into jneeman
[lilypond.git] / lily / system-start-text.cc
index 2bc4e507d65ec6cb17758c907a31113d48eda90b..a0a90b06c3fb0b52809cfeb3b6ab580380a351f7 100644 (file)
 #include "font-interface.hh"
 #include "spanner.hh"
 #include "stencil.hh"
+#include "item.hh"
 
 class System_start_text
 {
 public:
   static Stencil get_stencil (Grob *);
-  static bool has_interface (Grob *);
+  DECLARE_GROB_INTERFACE();
 
   DECLARE_SCHEME_CALLBACK (print, (SCM));
 };
@@ -56,6 +57,12 @@ System_start_text::print (SCM smob)
 {
   Spanner *me = unsmob_spanner (smob);
 
+  if (!me->get_bound (LEFT)->break_status_dir ())
+    {
+      me->suicide ();
+      return SCM_EOL;
+    }
+
   extract_grob_set (me, "elements", all_elts);
   vector<Grob*> elts;
   for (vsize i = 0; i < all_elts.size (); i++)
@@ -81,13 +88,13 @@ System_start_text::print (SCM smob)
     }
 
   Stencil m = get_stencil (me);
-  m.translate_axis (ext.center (), Y_AXIS);
+  if (!ext.is_empty ())
+    m.translate_axis (ext.center (), Y_AXIS);
   return m.smobbed_copy ();
 }
 
 
 ADD_INTERFACE (System_start_text,
-              "system-start-text-interface",
               "Text in front of the system.",
 
               /* properties */