Only change camera range if camera range is valid

This was a debugging test to see if this fixed an issue. It turned out to not be the issue in question, but this is still a defensive coding thing that would be good to have.
This commit is contained in:
Ghostkeeper 2018-08-17 10:56:29 +02:00
parent 284f90f3ff
commit 9f190590b1
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -561,7 +561,9 @@ class BuildVolume(SceneNode):
camera = Application.getInstance().getController().getCameraTool()
if camera:
camera.setZoomRange(min = 1, max = self.getDiagonalSize() * 5) #You can zoom out up to 5 times the diagonal. This gives some space around the volume.
diagonal = self.getDiagonalSize()
if diagonal > 1:
camera.setZoomRange(min = 0.1, max = diagonal * 5) #You can zoom out up to 5 times the diagonal. This gives some space around the volume.
def _onEngineCreated(self):
self._engine_ready = True