diff --git a/src/Mod/Draft/draftguitools/gui_stretch.py b/src/Mod/Draft/draftguitools/gui_stretch.py index 3ccdf8c326..3dcd699bda 100644 --- a/src/Mod/Draft/draftguitools/gui_stretch.py +++ b/src/Mod/Draft/draftguitools/gui_stretch.py @@ -337,6 +337,8 @@ class Stretch(gui_base_original.Modifier): optype = 3 elif ops[1] == [True, True, False, False]: optype = 4 + elif ops[1] == [True, True, True, True]: + optype = 5 else: optype = 0 # print("length:", ops[0].Length, @@ -344,7 +346,7 @@ class Stretch(gui_base_original.Modifier): # " - ", ops[1], # " - ", self.displacement) done = False - if optype > 0: + if 0 < optype < 5: v1 = ops[0].Placement.multVec(p2).sub(ops[0].Placement.multVec(p1)) a1 = round(self.displacement.getAngle(v1), 4) v2 = ops[0].Placement.multVec(p4).sub(ops[0].Placement.multVec(p1)) @@ -443,6 +445,12 @@ class Stretch(gui_base_original.Modifier): commitops.append(_cmd) commitops.append(_pl) done = True + elif optype == 5: + _pl = _doc + ops[0].Name + _pl += ".Placement.Base=FreeCAD." + _pl += str(ops[0].Placement.Base.add(self.displacement)) + commitops.append(_pl) + done = True if not done: # otherwise create a wire copy and stretch it instead _msg(translate("draft", "Turning one Rectangle into a Wire"))