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

Unified Diff: lily/ottava-engraver.cc

Issue 344010043: Issue 5336: Remove downcasting methods from Grob_array and Grob_info (Closed)
Patch Set: Created 5 years, 9 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/ligature-bracket-engraver.cc ('k') | lily/paper-column-engraver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lily/ottava-engraver.cc
diff --git a/lily/ottava-engraver.cc b/lily/ottava-engraver.cc
index e9bcbe94d5ffdb3f53bd5b9da14a749e7f067dbb..b5288c98b7fc78a34dac530b50ebad66b81c1251 100644
--- a/lily/ottava-engraver.cc
+++ b/lily/ottava-engraver.cc
@@ -84,14 +84,16 @@ Ottava_spanner_engraver::process_music ()
void
Ottava_spanner_engraver::acknowledge_note_column (Grob_info info)
{
- Item *it = info.item ();
- if (span_ && it)
+ if (span_)
{
- Side_position_interface::add_support (span_, it);
+ if (Item *it = dynamic_cast<Item *> (info.grob ()))
+ {
+ Side_position_interface::add_support (span_, it);
- if (!span_->get_bound (LEFT))
- span_->set_bound (LEFT, it);
- span_->set_bound (RIGHT, it);
+ if (!span_->get_bound (LEFT))
+ span_->set_bound (LEFT, it);
+ span_->set_bound (RIGHT, it);
+ }
}
}
« no previous file with comments | « lily/ligature-bracket-engraver.cc ('k') | lily/paper-column-engraver.cc » ('j') | no next file with comments »

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