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

Refactored World management #4043

Merged
merged 4 commits into from
Sep 3, 2024
Merged

Conversation

bjorn
Copy link
Member

@bjorn bjorn commented Aug 28, 2024

This way it is more inline with how the other assets are managed. It also avoids silly issues, like a WorldDocument pointer not getting looked up successfully due to a file name mismatch.

Fixes #4042

This was it is more inline with how the other assets are managed. It also
avoids silly issues, like a WorldDocument pointer not getting looked up
successfully due to a file name mismatch.

Fixes mapeditor#4042
* When loading a world, just set the file name it was loaded from. The
  canonical path will be determined by the WorldDocument.

* When looking for a world for the current map, the MapScene no longer
  uses the canonical file path. This way, it will find the world as long
  as it was loaded from the same location.

In general, I'm starting to doubt whether we should ever use the
canonical file path for anything. It might be better, if the same
resources loaded through different paths are simply regarded as
different resources?
For consistency with the map and tileset reload, and because it is nice
to allow the user to undo the reload, in case it threw away changes they
did not want to lose.
@bjorn bjorn merged commit f583970 into mapeditor:master Sep 3, 2024
11 of 13 checks passed
@bjorn bjorn deleted the refactor-world-management branch September 3, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segfault when attempting to operate on a world accessed through a directory symlink
1 participant