function processMLFBVariants(this, addedvariants)
    % PROCESSMLFBVARIANT Process the variant subsystems added during the apply
    % phase.
    
    % Copyright 2016-2018 The MathWorks, Inc.
    
    dataController = this.getDataController;
    
    % Update the tree
    for i = 1:numel(addedvariants)
        mlfbVariantSubsys = addedvariants(i);
        if isa(mlfbVariantSubsys, 'Simulink.SubSystem')
            variantParent = mlfbVariantSubsys.getParent;
            existingNode = this.ModelHierarchy.findNode('Object', mlfbVariantSubsys);
            if isempty(existingNode) || ~isequal(existingNode.getParent.Object, variantParent)
                this.ModelHierarchy.addVariantToParent(mlfbVariantSubsys, variantParent);
            end
        end
    end
    
    % g1845797 - on reconversion, MLFB variants were not being updated to
    % be active for the fixed-point design. applyEmbeddedSettings applies a
    % shortcut that uses VariantOverrideEnum.OverrideUsingFixedPoint to
    % prepares the model for verification
    this.ExternalViewer.overrideConvertedMATLABFunctionBlocksUsingFixedPoint(this.getModel);
    
    % Update the spreadsheet mapping
    newTreeData = this.ModelHierarchy.getAddedTreeData;
    if ~isempty(newTreeData)
        viewDS = dataController.getViewDataset;
        viewDS.updateSpreadsheetMappingForVariantAddition({newTreeData});
    end
    
end