From 5db723084547343dde7c8a0e11f2ca1f7c7149f2 Mon Sep 17 00:00:00 2001 From: Treeki Date: Fri, 17 Feb 2012 20:25:37 +0100 Subject: disabled reloadTileset until it gets fixed --- src/mapdata.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/mapdata.py b/src/mapdata.py index 0025550..2bdc4eb 100644 --- a/src/mapdata.py +++ b/src/mapdata.py @@ -747,12 +747,23 @@ class KPMap(object): data = filehandler.read() filehandler.close() hash = sha(data).hexdigest() + + # this is a bit messy + try: + old_info = self.tilesets[name] + if old_info['hash'] == hash: + continue + except KeyError: + pass self.tilesets[name] = {'path': filepath, 'hash': hash} self.loadedTilesets[name] = KPTileset.loadFromArc(filepath) def reloadTileset(self, name): + # TODO: Re-enable this when it's fixed. + return + from hashlib import sha256 as sha info = self.tilesets[name] -- cgit v1.2.3