-
- if (Stem::has_interface (i.elem_l_)
- || Slur::has_interface (i.elem_l_)
- // || Text_item::has_interface (i.elem_l_)
- //|| Hairpin::has_interface (i.elem_l_)
- )
+
+ Direction d = CENTER;
+ if (daddy_trans_->id_string_.left_string (3) == "one")
+ d = UP;
+ else if (daddy_trans_->id_string_.left_string (3) == "two")
+ d = DOWN;
+
+ /* Must only set direction for VoiceCombines, not for StaffCombines:
+ we can't detect that here, so we use yet another property */
+ if (!to_boolean (get_property ("noDirection"))
+ && (Stem::has_interface (i.grob_)
+ || Slur::has_interface (i.grob_)
+ || Tie::has_interface (i.grob_)
+ /* Usually, dynamics are removed by *_devnull_engravers for
+ the second voice. On the one hand, we don't want all
+ dynamics for the first voice to be placed above the
+ staff. On the other hand, colliding of scripts may be
+ worse. So, we don't set directions for these when we're
+ playing solo. */
+ || (i.grob_->internal_has_interface (ly_symbol2scm
+ ("dynamic-interface"))
+ && state_ != SOLO)
+ || (i.grob_->internal_has_interface (ly_symbol2scm
+ ("text-interface"))
+ && state_ != SOLO)
+ ))