If a VerticalAxisGroup already has a StaffGrouper, don't override it.
--- /dev/null
+\version "2.13.52"
+
+\header {
+ texidoc = "StaffGroups can be nested, in which case the inner StaffGroup wins."
+}
+
+\score {
+ <<
+ \new StaffGroup <<
+ \new Staff {
+ c'1
+ }
+ \new StaffGroup \with {
+ \override StaffGrouper #'staffgroup-staff-spacing #'basic-distance = #20
+ } <<
+ \new Staff {
+ c'1
+ }
+ \new Staff {
+ c'1
+ }
+ >>
+ \new Staff {
+ c'1
+ }
+ >>
+ >>
+}
+
}
}
}
- else if (qualifies (i))
+ else if (qualifies (i) && !unsmob_grob (i.grob ()->get_object ("staff-grouper")))
{
Pointer_group_interface::add_grob (valign_, ly_symbol2scm ("elements"), i.grob ());
i.grob ()->set_object ("staff-grouper", valign_->self_scm ());