Adjusted external map change detection

On some systems changes by tiled were not detected and therefore the refresh button was greyed. The reason might have been that tiled recreates the files instead of changing them.
This commit is contained in:
Gonk
2019-04-20 21:35:59 +02:00
parent 57702a3a4a
commit 450b0de02a

View File

@@ -100,7 +100,7 @@ public class TMXMapSet implements ProjectTreeNode {
while(getProject().open) {
try {
watchService = FileSystems.getDefault().newWatchService();
/*WatchKey watchKey = */folderPath.register(watchService, StandardWatchEventKinds.ENTRY_MODIFY);
/*WatchKey watchKey = */folderPath.register(watchService, StandardWatchEventKinds.ENTRY_MODIFY, StandardWatchEventKinds.ENTRY_CREATE);
WatchKey wk;
validService: while(getProject().open) {
wk = watchService.poll(10, TimeUnit.SECONDS);