- bool end = line_ && (running_.empty ()
- || early_end_);
- Direction d = LEFT;
- do
- {
- if (line_
- && ((d == LEFT && !line_->get_bound (LEFT))
- || (end && d == RIGHT && !line_->get_bound (RIGHT))))
- {
- vector<Spanner *> const &spanners
- = (d == LEFT) ? started_ : ended_;
-
- Grob *bound = 0;
- if (scripts_.size ())
- bound = scripts_[0];
- else if (spanners.size ())
- bound = spanners[0]->get_bound (d);
- else
- {
- bound = unsmob_grob (get_property ("currentMusicalColumn"));
- if (!early_end_)
- programming_error ("started DynamicLineSpanner but have no left bound");
- }
-
- line_->set_bound (d, bound);
- }
- }
- while (flip (&d) != LEFT);
-
- for (vsize i = 0; line_ && i < support_.size (); i++)
+ bool end = line_ && running_.empty ();
+
+ // Set the proper bounds for the current spanner and for a spanner that
+ // is ended now
+ set_spanner_bounds (ended_line_, true);
+ set_spanner_bounds (line_, end);
+ // If the flag is set to break the spanner after the current child, don't
+ // add any more support points (needed e.g. for style=none, where the
+ // invisible spanner should NOT be shifted since we don't have a line).
+ bool spanner_broken = current_dynamic_spanner_
+ && to_boolean (current_dynamic_spanner_->get_property ("spanner-broken"));
+ for (vsize i = 0; line_ && !spanner_broken && i < support_.size (); i++)