Changes to SumRules, LegendSelector, XMCDPlugin and AdvancedAlignmentPlugin