Merge branch 'master' of ssh://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad

This commit is contained in:
wmayer 2012-08-15 10:25:30 +02:00
commit d9d66f21a4
2 changed files with 11 additions and 11 deletions

View File

@ -990,7 +990,7 @@ class DraftToolBar:
def setCurrentText(self,tstr):
if (not self.taskmode) or (self.taskmode and self.isTaskOn):
self.textValue.setText(tstr)
def sendText(self):
'''
this function sends the entered text to the active draft command

View File

@ -317,16 +317,16 @@ class Snapper:
"returns a 3D point, projected on the current working plane"
view = Draft.get3DView()
pt = view.getPoint(x,y)
if hasattr(FreeCAD,"DraftWorkingPlane"):
if view.getCameraType() == "Perspective":
camera = view.getCameraNode()
p = camera.getField("position").getValue()
dv = pt.sub(Vector(p[0],p[1],p[2]))
else:
dv = view.getViewDirection()
return FreeCAD.DraftWorkingPlane.projectPoint(pt,dv)
else:
return pt
if self.mask != "z":
if hasattr(FreeCAD,"DraftWorkingPlane"):
if view.getCameraType() == "Perspective":
camera = view.getCameraNode()
p = camera.getField("position").getValue()
dv = pt.sub(Vector(p[0],p[1],p[2]))
else:
dv = view.getViewDirection()
return FreeCAD.DraftWorkingPlane.projectPoint(pt,dv)
return pt
def snapToExtensions(self,point,last,constrain,eline):
"returns a point snapped to extension or parallel line to last object, if any"