Skip to content

Editor: Fix RefNum loading

Removes some minor nonsense code branches that occur when loading refnums. Basically, they have to be corrected unconditionally. adjustRefNum should take care of this, but would require a much larger refactor of existing code in order to work properly.

The real root of the issue is that adjustRefNum doesn't work properly due to reader.getParentFileIndices always returning an empty vector/set/whatever, so the size is always zero, so references always appear to be local. This could possibly be fixed by figuring out how to set up a ReadersCache and relying on resolveParentFileIndices, but I'm uncertain about how to do this and whether it'd ultimately be beneficial, so instead submit this simpler fix which I've verified to resolve the problem.

Merge request reports

Loading