(In reply to Oliver Kellogg from comment #20)
> Git commit 3360998e by Oliver Kellogg. > Committed on 10/08/2014 at 18:28. > Pushed by okellogg into branch 'master'. > [...] > However, apparently Widget_Utils::closestPoints() still has a bug related to > anchoring in the NorthWest, West, and SouthWest regions; I'll look into that > next. Here is the fix for this problem. umbrello/widgets/widget_utils.cpp function closestPoints() - Introduce constants selfLastIndex and otherLastIndex which exclude the redundant point in case QPolygonF::isClosed() returns true on self resp. other. - In for-loops over `other' replace upper bound `other.size() - 1' by otherLastIndex. - In for-loops over `self' replace upper bound `self.size() - 1' by selfLastIndex. - In loops of cases NorthWest, SouthWest, NorthEast, and SouthEast, replace "<" comparisons by "<=" and replace ">" comparisons by ">=". The association lines now do attach to the template-class widgets. However, the attachment points are not always optimal. Perhaps the algorithm used by Widget_Utils::closestPoints() can be improved. CCBUG:128351
parent
3360998e
Please register or sign in to comment