Changeset 6516


Ignore:
Timestamp:
Aug 14, 2014, 1:12:11 PM (7 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1833: Item overview load incorrect platform variants

This was a problem with caching a platform even if the variants was different, and then always adding a "variant" subnode, not checking if it already existed or not.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-stable/src/core/net/sf/basedb/util/overview/loader/PlatformLoader.java

    r4740 r6516  
    8989      denied = true;
    9090    }
    91     Node platformNode = createItemNode(nf, platform, platform, denied, parentNode, ChildNodeDirection.NONE);
    92     if (platformNode != null && variant != null)
     91    Node platformNode = createItemNode(nf, platform, variant != null ? variant : platform, denied, parentNode, ChildNodeDirection.NONE);
     92    if (platformNode != null && variant != null && platformNode.getChild("variant") == null)
    9393    {
    9494      NodeNameGenerator<PlatformVariant> nameGenerator =
     
    9696      NodeFactory<PlatformVariant> variantNodeFactory =
    9797        new NodeFactory<PlatformVariant>(dc, context, null, nameGenerator);
    98       variantNodeFactory.createNode(variant, variant, platformNode, ChildNodeDirection.NONE);
     98      variantNodeFactory.createNode(variant, null, platformNode, ChildNodeDirection.NONE);
    9999    }
    100100    return platformNode;
Note: See TracChangeset for help on using the changeset viewer.