From 544e85ff3ff8954a15c455c4e0ce3906edcb0655 Mon Sep 17 00:00:00 2001 From: SurajDadral Date: Mon, 23 Sep 2019 15:47:32 +0530 Subject: [PATCH] Fix editing of single rebar object Problem: Unable to set OffsetStart value to greater than (size of structure object along direction of expansion of rebars)/2 for single rebar object Solution: Drop check if(OffsetStart + OffsetEnd > size), when there is only one rebar object. --- src/Mod/Arch/ArchRebar.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/Arch/ArchRebar.py b/src/Mod/Arch/ArchRebar.py index d01748a2cb..7e824e43da 100644 --- a/src/Mod/Arch/ArchRebar.py +++ b/src/Mod/Arch/ArchRebar.py @@ -355,8 +355,9 @@ class _Rebar(ArchComponent.Component): if obj.CustomSpacing: spacinglist = strprocessOfCustomSpacing(obj.CustomSpacing) influenceArea = sum(spacinglist) - spacinglist[0] / 2 - spacinglist[-1] / 2 - if (obj.OffsetStart.Value + obj.OffsetEnd.Value) > size: - return + if obj.Amount != 1: + if (obj.OffsetStart.Value + obj.OffsetEnd.Value) > size: + return # all tests ok! if hasattr(obj, "Length"): length = getLengthOfRebar(obj)