[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [umbrello] [Bug 128351] Lines connect to bounding box of component interface instead of interface
From:       Oliver Kellogg <okellogg () users ! sourceforge ! net>
Date:       2014-08-10 22:01:22
Message-ID: bug-128351-17878-qf3X3DgrKL () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=128351

--- Comment #21 from Oliver Kellogg <okellogg@users.sourceforge.net> ---
Git commit 933143c62f5877bf649ad090d5d34d2e45e2195f by Oliver Kellogg.
Committed on 10/08/2014 at 22:02.
Pushed by okellogg into branch 'master'.

(In reply to Oliver Kellogg from comment #20)
> Git commit 3360998ea25f5974455939bd100fb4c37bd17d36 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.

M  +28   -26   umbrello/widgets/widget_utils.cpp

http://commits.kde.org/umbrello/933143c62f5877bf649ad090d5d34d2e45e2195f

-- 
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic