Index: lily/grob.cc |
diff --git a/lily/grob.cc b/lily/grob.cc |
index 5047b35be0c0c337d45bddf338fdc49f7a5f0384..9523149642968243f093db7ed9e9281b6169b1c3 100644 |
--- a/lily/grob.cc |
+++ b/lily/grob.cc |
@@ -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 () |