[dia/dia-0-97] Bug 622315 - multiplicity labels overlap with association name
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia/dia-0-97] Bug 622315 - multiplicity labels overlap with association name
- Date: Sat, 17 Dec 2011 15:59:41 +0000 (UTC)
commit 35ff1dac1a6e2d99d7a96310b02a2f64865eae79
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.
(cherry picked from commit 57faf505d0ccaea7b98ef234828eae3d04162349)
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 058e171..1055d7d 100644
--- a/objects/UML/association.c
+++ b/objects/UML/association.c
@@ -719,10 +719,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]