From 74a6bb425310f806979f27a2b110976c412e88f7 Mon Sep 17 00:00:00 2001 From: Amritpal Singh Date: Tue, 23 Oct 2018 22:48:31 +0530 Subject: [PATCH] Updated Draft Dimension object. --- src/Mod/Draft/Draft.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 2bbf006fa6..25af23d59f 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -4165,6 +4165,10 @@ class _Dimension(_DraftObject): n2 = int(lsub2[0][6:])-1 obj.Start = lobj1.Shape.Vertexes[n1].Point obj.End = lobj2.Shape.Vertexes[n2].Point + # set the distance property + total_len = (obj.Start.sub(obj.End)).Length + if round(obj.Distance.Value, precision()) != round(total_len, precision()): + obj.Distance = total_len if gui: if obj.ViewObject: obj.ViewObject.update() @@ -4421,9 +4425,6 @@ class _ViewProviderDimension(_ViewProviderDraft): self.string = obj.ViewObject.Override.replace("$dim",\ self.string) self.text.string = self.text3d.string = stringencodecoin(self.string) - # set the distance property - if round(obj.Distance.Value,precision()) != round(l,precision()): - obj.Distance = l # set the lines if m == "3D":