Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LinkedScene : Fix incorrect linkLocations attribute value #1378

Merged
merged 1 commit into from
Jul 21, 2023

Commits on Jul 20, 2023

  1. LinkedScene : Fix incorrect linkLocations attribute value

    The old code was incorrectly appending the target's location to the
    `linkLocations`.
    
    The `linkLocations` are expected to hold the locations in the current
    LinkedScene that contain links to other files. These paths are expected
    to exist in the LinkedScene itself.
    
    Everything worked fine if the target location was set to the ROOT, but
    if it was targeting an internal location, that would be appended which
    would result in an invalid path.
    
    The cause for that bug was that we were updating `m_linkedScene`, which
    is used to compute LinkedScene::path(), but not updating the
    `m_rootLinkDepth` property, which is also used to compute the path, by
    stripping out part of it based on the depth of the link.
    
    For `linkLocations`, that depth should generally be expected to
    completely remove any contributions from `m_linkedScene`, since this
    is the location where the link is being created, and therefore the
    `m_rootLinkDepth` will match the length of the path inside the target
    linked scene that we are linking to.
    
    Note that existing saved `lscc` files have the attribute baked in, and
    are therefore not fixed by this commit. A new export is necessary in
    order to fix it.
    ivanimanishi committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    c7538a7 View commit details
    Browse the repository at this point in the history