av.setGlobalColourScheme(acg);
- if (av.getAlignment().getGroups() != null)
+ /*
+ * set this colour scheme on groups that have no colour scheme configured;
+ * note we can skip this if 'apply to all groups' is selected,
+ * as it will have been done by av.setGlobalColourScheme
+ */
+ if (!av.getColourAppliesToAllGroups()
+ && av.getAlignment().getGroups() != null)
{
-
for (SequenceGroup sg : ap.av.getAlignment().getGroups())
{
- if (sg.cs == null)
+ if (sg.getColourScheme() == null)
{
- continue;
+ sg.setColourScheme(
+ acg.getInstance(sg, ap.av.getHiddenRepSequences()));
}
- sg.setColourScheme(
- acg.getInstance(sg, ap.av.getHiddenRepSequences()));
}
}
}