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

Make "file not found" behavior more source control friendly #4130

Open
ilyvion opened this issue Dec 30, 2024 · 0 comments
Open

Make "file not found" behavior more source control friendly #4130

ilyvion opened this issue Dec 30, 2024 · 0 comments
Labels
feature It's a feature, not a bug.

Comments

@ilyvion
Copy link

ilyvion commented Dec 30, 2024

Is your feature request related to a problem? Please describe.
Every time an open file is deleted or moved, Tiled pops up a dialog that requires user interaction to resolve, like this:
image

This gets very frustrating very quickly when you have a lot of maps open and you're working with source control. I use git, and I'm often moving between branches or commits, stashing and un-stashing changes, etc., and there's a constant cacophony of error dialog sounds from Tiled and an ever increasing stack of dialogs like the one above I have to press "OK" on before I can resume work after I'm done.

Describe the solution you'd like
I love the way Visual Studio Code deals with this situation. The open file gets a red color and a strikethrough on the open file tab, but otherwise nothing happens:
image
and if you bring the file back, it reloads it and goes back to showing it as a normal, open tab:
image

If you happen to be editing the file and it is removed and restored with different changes since you started editing it, you will be notified of this only when attempting to save your new changes:
image
and again, it's an important detail that this only shows up when the file being saved is different on disk than when the edit started. So even if you made a bunch of edits to the file behind the scenes, it'll still save just fine if the contents of it is back to what VSCode expects by the time you save, or if you deleted it.

Describe alternatives you've considered
Something that does work is closing all the maps before doing file operations as the editor only complains about rug pulls on open files. But it's easy to forget and a less friendly option when making on-going changes to multiple files that you like keeping open.

@ilyvion ilyvion added the feature It's a feature, not a bug. label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug.
Projects
None yet
Development

No branches or pull requests

1 participant