Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Prado Gesto <d.pradogesto@ultimaker.com>2018-07-03 13:06:06 +0300
committerDiego Prado Gesto <d.pradogesto@ultimaker.com>2018-07-03 13:06:06 +0300
commit762a1b1bfdbb7fcb37bfa08013870793f5d20640 (patch)
tree998a09560ba50ae9a2f61bc8b5b1afa560e9014c /cura/CuraActions.py
parente983a9a9e72635d864e6d7ba053e7d1b31daa421 (diff)
Fix code-style
Diffstat (limited to 'cura/CuraActions.py')
-rw-r--r--cura/CuraActions.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/cura/CuraActions.py b/cura/CuraActions.py
index 1ddc41717e..1b2c6c576c 100644
--- a/cura/CuraActions.py
+++ b/cura/CuraActions.py
@@ -49,9 +49,10 @@ class CuraActions(QObject):
def homeCamera(self) -> None:
scene = cura.CuraApplication.CuraApplication.getInstance().getController().getScene()
camera = scene.getActiveCamera()
- camera.setPosition(Vector(-80, 250, 700))
- camera.setPerspective(True)
- camera.lookAt(Vector(0, 0, 0))
+ if camera:
+ camera.setPosition(Vector(-80, 250, 700))
+ camera.setPerspective(True)
+ camera.lookAt(Vector(0, 0, 0))
## Center all objects in the selection
@pyqtSlot()