[dia] Bug 622315 - multiplicity labels overlap with association name
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Bug 622315 - multiplicity labels overlap with association name
- Date: Mon, 6 Jun 2011 13:31:43 +0000 (UTC)
commit 57faf505d0ccaea7b98ef234828eae3d04162349
Author: Hans Breuer <hans breuer org>
Date: Mon Jun 6 15:31:23 2011 +0200
Bug 622315 - multiplicity labels overlap with association name
Looks like the original attempt for bug 143891 did not go far enough.
I did not manage to overlap multiplicity labels with the class box, though.
objects/UML/association.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/objects/UML/association.c b/objects/UML/association.c
index 67481dc..e019c56 100644
--- a/objects/UML/association.c
+++ b/objects/UML/association.c
@@ -730,10 +730,10 @@ association_update_data(Association *assoc)
i--;
}
dir = assoc->orth.orientation[i];
- /* also adapt for degenerated segement */
- if (VERTICAL == dir && points[i].y == points[i+1].y)
+ /* also adapt for degenerated segment */
+ if (VERTICAL == dir && fabs(points[i].y - points[i+1].y) < 1e-6)
dir = HORIZONTAL;
- else if (HORIZONTAL == dir && points[i].x == points[i+1].x)
+ else if (HORIZONTAL == dir && fabs(points[i].x - points[i+1].x) < 1e-6)
dir = VERTICAL;
switch (dir) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]