diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index cfae0b9..09d336b 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -280,12 +280,20 @@ Tuplet_bracket::print (SCM smob) else if (bracket == ly_symbol2scm ("if-no-beam")) bracket_visibility = !par_beam; + /* Don't print a tuplet bracket and number if no control-points were calculated */ SCM cpoints = me->get_property ("control-points"); if (scm_ilength (cpoints) < 2) { me->suicide (); return SCM_EOL; } + /* if the tuplet does not span any time, i.e. a single-note tuplet, hide + the bracket, but still let the number be displayed */ + if (robust_scm2moment (me->get_bound (LEFT)->get_column ()->get_property ("when"), Moment (0)) + == robust_scm2moment (me->get_bound (RIGHT)->get_column ()->get_property ("when"), Moment (0))) + { + bracket_visibility = false; + } Drul_array points; points[LEFT] = ly_scm2offset (scm_car (cpoints)); @@ -686,16 +694,6 @@ Tuplet_bracket::calc_positions (SCM smob) { Spanner *me = unsmob_spanner (smob); - /* - Don't print if it doesn't span time. - */ - if (robust_scm2moment (me->get_bound (LEFT)->get_column ()->get_property ("when"), Moment (0)) - == robust_scm2moment (me->get_bound (RIGHT)->get_column ()->get_property ("when"), Moment (0))) - { - me->suicide (); - return SCM_EOL; - } - Real dy = 0.0; Real offset = 0.0; calc_position_and_height (me, &offset, &dy); diff --git a/lily/tuplet-number.cc b/lily/tuplet-number.cc index 22d857b..78697ca 100644 --- a/lily/tuplet-number.cc +++ b/lily/tuplet-number.cc @@ -35,16 +35,6 @@ Tuplet_number::print (SCM smob) return SCM_EOL; } - /* - Don't print if it doesn't span time. - */ - if (robust_scm2moment (tuplet->get_bound (LEFT)->get_column ()->get_property ("when"), Moment (0)) - == robust_scm2moment (tuplet->get_bound (RIGHT)->get_column ()->get_property ("when"), Moment (0))) - { - me->suicide (); - return SCM_EOL; - } - SCM stc_scm = Text_interface::print (smob); Stencil *stc = unsmob_stencil (stc_scm);