From 4f66270b810b5889744f949d6b38d6f5e8e43e8c Mon Sep 17 00:00:00 2001 From: Treeki Date: Fri, 18 Nov 2011 05:44:40 +0100 Subject: broken but I'm committing it anyway --- src/mapdata.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mapdata.py') 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): -- cgit v1.2.3