Arch: Fixed toolbar mode - fixes #1473
This commit is contained in:
@@ -481,11 +481,12 @@ class _CommandStructure:
|
||||
|
||||
def update(self,point,info):
|
||||
"this function is called by the Snapper when the mouse is moved"
|
||||
if self.Height >= self.Length:
|
||||
delta = Vector(0,0,self.Height/2)
|
||||
else:
|
||||
delta = Vector(self.Length/2,0,0)
|
||||
self.tracker.pos(point.add(delta))
|
||||
if FreeCADGui.Control.activeDialog():
|
||||
if self.Height >= self.Length:
|
||||
delta = Vector(0,0,self.Height/2)
|
||||
else:
|
||||
delta = Vector(self.Length/2,0,0)
|
||||
self.tracker.pos(point.add(delta))
|
||||
|
||||
def setWidth(self,d):
|
||||
self.Width = d
|
||||
|
||||
@@ -246,20 +246,21 @@ class _CommandWall:
|
||||
|
||||
def update(self,point,info):
|
||||
"this function is called by the Snapper when the mouse is moved"
|
||||
b = self.points[0]
|
||||
n = FreeCAD.DraftWorkingPlane.axis
|
||||
bv = point.sub(b)
|
||||
dv = bv.cross(n)
|
||||
dv = DraftVecUtils.scaleTo(dv,self.Width/2)
|
||||
if self.Align == "Center":
|
||||
self.tracker.update([b,point])
|
||||
elif self.Align == "Left":
|
||||
self.tracker.update([b.add(dv),point.add(dv)])
|
||||
else:
|
||||
dv = dv.negative()
|
||||
self.tracker.update([b.add(dv),point.add(dv)])
|
||||
if self.Length:
|
||||
self.Length.setValue(bv.Length)
|
||||
if FreeCADGui.Control.activeDialog():
|
||||
b = self.points[0]
|
||||
n = FreeCAD.DraftWorkingPlane.axis
|
||||
bv = point.sub(b)
|
||||
dv = bv.cross(n)
|
||||
dv = DraftVecUtils.scaleTo(dv,self.Width/2)
|
||||
if self.Align == "Center":
|
||||
self.tracker.update([b,point])
|
||||
elif self.Align == "Left":
|
||||
self.tracker.update([b.add(dv),point.add(dv)])
|
||||
else:
|
||||
dv = dv.negative()
|
||||
self.tracker.update([b.add(dv),point.add(dv)])
|
||||
if self.Length:
|
||||
self.Length.setValue(bv.Length)
|
||||
|
||||
def taskbox(self):
|
||||
"sets up a taskbox widget"
|
||||
|
||||
Reference in New Issue
Block a user