Mercurial > fife-parpg
diff tools/editor/scripts/mapview.py @ 402:bc6730a27820
* Fixed a bug where the editor would not activate the new mapview after closing a map
* Fixed a crash caused by not all cameras belonging to a map being removed
author | cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 29 Jan 2010 10:55:21 +0000 |
parents | ac7806c46b94 |
children | ba2d683ccee3 |
line wrap: on
line diff
--- a/tools/editor/scripts/mapview.py Thu Jan 28 22:47:20 2010 +0000 +++ b/tools/editor/scripts/mapview.py Fri Jan 29 10:55:21 2010 +0000 @@ -80,6 +80,7 @@ engine = self._editor.getEngine() engine.getView().resetRenderers() + for cam in engine.getView().getCameras(): cam.setEnabled(False) @@ -146,10 +147,11 @@ # Remove cameras view = self._editor.getEngine().getView() - for cam in view.getCameras(): + for cam in view.getCameras()[:]: if cam.getLocationRef().getMap().getId() == self._map.getId(): cam.setEnabled(False) view.removeCamera(cam) + view.resetRenderers() # Unload the map from FIFE @@ -158,5 +160,4 @@ self._cleanUp() events.postMapClosed.send(sender=self, mapview=self) - \ No newline at end of file