[dia] Sprinkle some more connection_adjust_for_autogap()
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Sprinkle some more connection_adjust_for_autogap()
- Date: Sun, 4 Aug 2013 12:44:51 +0000 (UTC)
commit c43ae9398ac3e5ce0382f7a403eeaa238dfabb23
Author: Hans Breuer <hans breuer org>
Date: Sat Aug 3 21:34:07 2013 +0200
Sprinkle some more connection_adjust_for_autogap()
Review after bug 697741 and:
* move_handle() method needs to call connection_adjust_for_autogap() after
2007-01-03 Hans Breuer <hans breuer org>
* objects/UML/constraint.c objects/UML/implements.c
objects/UML/message.c objects/Jackson/phenomenon.c
objects/KAOS/metaandorrel.c : move_handle() method needs to call
connection_adjust_for_autogap() after connection_move_handle() because
the endpoints used for relative text movement need adjustment after
possible autogap correction.
objects/SADT/annotation.c | 2 ++
objects/standard/arc.c | 2 ++
objects/standard/line.c | 1 +
3 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/objects/SADT/annotation.c b/objects/SADT/annotation.c
index c274939..463db4e 100644
--- a/objects/SADT/annotation.c
+++ b/objects/SADT/annotation.c
@@ -231,6 +231,7 @@ annotation_move_handle(Annotation *annotation, Handle *handle,
if (handle->id == HANDLE_MOVE_STARTPOINT) {
p1 = endpoints[0];
connection_move_handle(conn, handle->id, to, cp, reason, modifiers);
+ connection_adjust_for_autogap(conn);
p2 = endpoints[0];
point_sub(&p2, &p1);
point_add(&annotation->text->position, &p2);
@@ -239,6 +240,7 @@ annotation_move_handle(Annotation *annotation, Handle *handle,
} else {
p1 = endpoints[1];
connection_move_handle(conn, handle->id, to, cp, reason, modifiers);
+ connection_adjust_for_autogap(conn);
p2 = endpoints[1];
point_sub(&p2, &p1);
point_add(&annotation->text->position, &p2);
diff --git a/objects/standard/arc.c b/objects/standard/arc.c
index 1e8bce6..64f6ef1 100644
--- a/objects/standard/arc.c
+++ b/objects/standard/arc.c
@@ -411,6 +411,7 @@ arc_move_handle(Arc *arc, Handle *handle,
if (!ok)
return NULL;
connection_move_handle(&arc->connection, handle->id, &best, cp, reason, modifiers);
+ connection_adjust_for_autogap(&arc->connection);
/* recompute curve distance equiv. move middle handle */
arc->curve_distance = arc_compute_curve_distance(arc, &arc->connection.endpoints[0],
&arc->connection.endpoints[1], &midpoint);
TRACE(printf("curve_dist: %.2f \n",arc->curve_distance));
@@ -420,6 +421,7 @@ arc_move_handle(Arc *arc, Handle *handle,
}
} else {
connection_move_handle(&arc->connection, handle->id, to, cp, reason, modifiers);
+ connection_adjust_for_autogap(&arc->connection);
}
}
diff --git a/objects/standard/line.c b/objects/standard/line.c
index 480dcaa..4e0f1ce 100644
--- a/objects/standard/line.c
+++ b/objects/standard/line.c
@@ -409,6 +409,7 @@ line_move_handle(Line *line, Handle *handle,
assert(to!=NULL);
connection_move_handle(&line->connection, handle->id, to, cp, reason, modifiers);
+ connection_adjust_for_autogap(&line->connection);
line_update_data(line);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]