]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
Rewrite the vertical layout of staves/systems.
[lilypond.git] / lily / grob.cc
index 5660b688b81fe477be9a4a538a5d69f02f1f074d..ce3e41c76dbcbf826d9191c9e27511edd23f1209 100644 (file)
@@ -747,3 +747,17 @@ robust_relative_extent (Grob *me, Grob *refpoint, Axis a)
   return ext;
 }
 
+// Checks whether there is a vertical alignment in the chain of
+// parents between this and commony.
+bool
+Grob::check_cross_staff (Grob *commony)
+{
+  if (Align_interface::has_interface (commony))
+    return true;
+
+  for (Grob *g = this; g && g != commony; g = g->get_parent (Y_AXIS))
+    if (Align_interface::has_interface (g))
+      return true;
+
+  return false;
+}