summaryrefslogtreecommitdiff
path: root/src/mapdata.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mapdata.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mapdata.py b/src/mapdata.py
index 3c60e53..8671430 100644
--- a/src/mapdata.py
+++ b/src/mapdata.py
@@ -114,9 +114,15 @@ class KPTileLayer(KPLayer):
class KPDoodad(object):
def __init__(self):
self.position = (0,0)
+ self.size = (0,0)
self.angle = 0
- self.scale = 1.0
self.index = 0
+
+ def setDefaultSize(self):
+ source = KP.mainWindow.doodadSelector.getDoodad(self.index)
+ pixmap = source.icon().pixmap(source.icon().availableSizes()[0])
+ self.size = pixmap.width(), pixmap.height()
+
class KPDoodadLayer(KPLayer):