]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
Merge remote branch 'origin' into release/unstable
[lilypond.git] / lily / grob.cc
index 882808180c6f2509cd7c807b5d22fed795f8239e..c613effccc65fd6be001aad742e41a1ed29b15a4 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -191,6 +191,16 @@ Grob::get_system () const
   return 0;
 }
 
+/* This version of get_system is more reliable than this->get_system ()
+   before line-breaking has been done, at which point there is only
+   one system in the whole score and we can find it just by following
+   parent pointers. */
+System *
+Grob::get_system(Grob *me)
+{
+  Grob *p = me->get_parent (X_AXIS);
+  return p ? get_system (p) : dynamic_cast<System *>(me);
+}
 
 void
 Grob::handle_broken_dependencies ()
@@ -483,7 +493,7 @@ Grob::spanned_rank_interval () const
 }
 
 bool
-Grob::pure_is_visible (int start, int end) const
+Grob::pure_is_visible (int /* start */, int /* end */) const
 {
   return true;
 }