diff clients/editor/scripts/mapview.py @ 321:7ddec4ce99b3

Fixed a crash when removing the layer which the editor camera uses
author cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
date Sun, 16 Aug 2009 21:35:15 +0000
parents 0adf9423062e
children e249fa887259
line wrap: on
line diff
--- a/clients/editor/scripts/mapview.py	Sun Aug 16 20:51:02 2009 +0000
+++ b/clients/editor/scripts/mapview.py	Sun Aug 16 21:35:15 2009 +0000
@@ -48,6 +48,17 @@
 
 	def getCamera(self):
 		return self._camera
+		
+	def setCamera(self, camera):
+		if not camera:
+			print "Camera can not be None"
+			return
+		
+		if camera.getLocation().getLayer().getMap() != self._map:
+			print "Camera is not associated with this map"
+			return
+			
+		self._camera = None
 	
 	def getController(self):
 		return self._controller