From 450b0de02a9db1f43a77cb17ba03f98360d8633b Mon Sep 17 00:00:00 2001 From: Gonk Date: Sat, 20 Apr 2019 21:35:59 +0200 Subject: [PATCH] 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. --- src/com/gpl/rpg/atcontentstudio/model/maps/TMXMapSet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/gpl/rpg/atcontentstudio/model/maps/TMXMapSet.java b/src/com/gpl/rpg/atcontentstudio/model/maps/TMXMapSet.java index 031cb42..23e244b 100644 --- a/src/com/gpl/rpg/atcontentstudio/model/maps/TMXMapSet.java +++ b/src/com/gpl/rpg/atcontentstudio/model/maps/TMXMapSet.java @@ -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);