Real
Grob::relative_coordinate (Grob const *refp, Axis a) const
{
- if (refp == this)
+ /* eaa - hmmm, should we do a programming_error() here? */
+ if ((this == NULL) || (refp == this))
return 0.0;
/* We catch PARENT_L_ == nil case with this, but we crash if we did
Real off = 0;
if (dim_cache_[Y_AXIS].offset_)
- off = *dim_cache_[Y_AXIS].offset_;
+ {
+ if (to_boolean (get_property ("pure-Y-offset-in-progress")))
+ programming_error ("cyclic chain in pure-Y-offset callbacks");
+
+ off = *dim_cache_[Y_AXIS].offset_;
+ }
else
{
SCM proc = get_property_data ("Y-offset");
dim_cache_[Y_AXIS].offset_ = new Real (0.0);
+ set_property ("pure-Y-offset-in-progress", SCM_BOOL_T);
off = robust_scm2double (call_pure_function (proc,
scm_list_1 (self_scm ()),
start, end),
0.0);
+ del_property ("pure-Y-offset-in-progress");
delete dim_cache_[Y_AXIS].offset_;
dim_cache_[Y_AXIS].offset_ = 0;
}
if (!iv.is_empty () && is_number_pair (min_ext))
iv.unite (ly_scm2interval (min_ext));
- iv.translate (offset);
+ if (!iv.is_empty ())
+ iv.translate (offset);
return iv;
}
}
Interval_t<int>
-Grob::spanned_rank_iv () const
+Grob::spanned_rank_interval () const
{
return Interval_t<int> (-1, 0);
}
"outside-staff-horizontal-padding "
"outside-staff-padding "
"outside-staff-priority "
+ "pure-Y-offset-in-progress "
"rotation "
"springs-and-rods "
"staff-symbol "