Skip to content

Commit

Permalink
Don't set camera rotation if there is no camera tool
Browse files Browse the repository at this point in the history
Fixes CURA-3NE (Sentry crash)
  • Loading branch information
nallath committed Apr 25, 2022
1 parent c850aa5 commit 7341da5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UM/Controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def deleteAllNodesWithMeshData(self, only_selectable:bool = True) -> None:
# Rotate camera view according defined angle
def setCameraRotation(self, coordinate: str = "x", angle: int = 0) -> None:
camera = self._scene.getActiveCamera()
if not camera:
if not camera or not self._camera_tool:
return
camera.setZoomFactor(camera.getDefaultZoomFactor())
self._camera_tool.setOrigin(Vector(0, 100, 0)) # type: ignore
Expand Down

0 comments on commit 7341da5

Please sign in to comment.