]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / lily / grob.cc
index 698d40457c66a069132de3327f3e88fa78981d46..e37fc94302bba8e1c2012db54952ee0287fa5e63 100644 (file)
@@ -702,7 +702,17 @@ Grob::stencil_width (SCM smob)
   return grob_stencil_extent (me, X_AXIS);
 }
 
+Stream_event*
+Grob::event_cause ()
+{
+  SCM cause = get_property ("cause");
+  if (to_boolean (Stream_event::smob_p (cause)))
+    return unsmob_stream_event (cause);
+  else if (to_boolean (Grob::smob_p (cause)))
+    return unsmob_grob (cause)->event_cause ();
 
+  return 0;
+}
 
 Grob *
 common_refpoint_of_list (SCM elist, Grob *common, Axis a)