Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(113)

Unified Diff: lily/grob.cc

Issue 2065041: Fix 1240. (Closed)
Patch Set: Created 13 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lily/align-interface.cc ('k') | lily/include/align-interface.hh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ()
« no previous file with comments | « lily/align-interface.cc ('k') | lily/include/align-interface.hh » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b