mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-10 07:15:03 -06:00
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:
parent
284f90f3ff
commit
9f190590b1
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue