Add a clean way to disable the up axis for the translation tool

This commit is contained in:
Arjen Hiemstra 2015-03-06 16:42:45 +01:00
parent c440c4bbdb
commit 69d2db05b7

View file

@ -5,6 +5,7 @@ from UM.Scene.Platform import Platform
from UM.Math.Vector import Vector from UM.Math.Vector import Vector
from UM.Math.Matrix import Matrix from UM.Math.Matrix import Matrix
from UM.Resources import Resources from UM.Resources import Resources
from UM.Scene.ToolHandle import ToolHandle
from UM.Scene.BoxRenderer import BoxRenderer from UM.Scene.BoxRenderer import BoxRenderer
from UM.Scene.Selection import Selection from UM.Scene.Selection import Selection
@ -56,7 +57,7 @@ class PrinterApplication(QtApplication):
t = controller.getTool('TranslateTool') t = controller.getTool('TranslateTool')
if t: if t:
t.setYRange(0.0, 0.0) t.setEnabledAxis([ToolHandle.XAxis, ToolHandle.ZAxis])
Selection.selectionChanged.connect(self.onSelectionChanged) Selection.selectionChanged.connect(self.onSelectionChanged)