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

Auto-refresh of tileset files only works for 1 refresh #44

Closed
Romulas opened this issue Jul 27, 2011 · 4 comments
Closed

Auto-refresh of tileset files only works for 1 refresh #44

Romulas opened this issue Jul 27, 2011 · 4 comments
Labels
bug Broken behavior.

Comments

@Romulas
Copy link

Romulas commented Jul 27, 2011

It happens only in photoshop (version doesnt seems to make difference), MSPaint is working fine.
Tested with png files. Restarting photoshop has no effect.

bjorn pushed a commit that referenced this issue Sep 4, 2011
Make sure that each time a change is detected, the timer is restarted.
Also, wait 500ms rather than 200ms after the last detected change before
reloading the image.

This tries to avoid the problem mentioned at #44
@stefanbeller
Copy link
Contributor

This issue came up on irc again:

chillyguess: Oh yep, we figured out a workaround
chillyguess: create a batch file, and use xcopy to 'move' the files to another folder and get Tiled to use that folder instead for tilesets

@bjorn
Copy link
Member

bjorn commented Aug 14, 2012

As of change bd17698 you can also press Ctrl+T to force-reload all tilesets of the current map.

@fo-fo
Copy link

fo-fo commented Apr 20, 2015

The cause of the issue is in FileSystemWatcher::onFileChanged() (in filesystemwatcher.cpp). When saving from Photoshop, mWatcher->files().contains(path) returns false, but QFile::exists(path) returns false also, so the file is never readded to the watcher.

Not sure what would be a proper way to fix it. One way might be to also watch the directory where the file is/was, and add the file back to the watcher if/when it reappears in the directory.

@bjorn
Copy link
Member

bjorn commented Apr 20, 2015

Thanks for investigating this @fo-fo! At least this gives us a clue about why it is breaking with Photoshop and we can consider ways to fix it, but indeed it seems we have to start tracking the directories also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken behavior.
Projects
None yet
Development

No branches or pull requests

4 participants