dia r3959 - in trunk: . objects/UML
- From: hans svn gnome org
- To: svn-commits-list gnome org
- Subject: dia r3959 - in trunk: . objects/UML
- Date: Sat, 26 Apr 2008 18:34:10 +0100 (BST)
Author: hans
Date: Sat Apr 26 17:34:10 2008
New Revision: 3959
URL: http://svn.gnome.org/viewvc/dia?rev=3959&view=rev
Log:
2008-04-26 Hans Breuer <hans breuer org>
* objects/UML/transition.c : move text positions by same delta than
the center handle, fixes bug #528738
Modified:
trunk/ChangeLog
trunk/objects/UML/transition.c
Modified: trunk/objects/UML/transition.c
==============================================================================
--- trunk/objects/UML/transition.c (original)
+++ trunk/objects/UML/transition.c Sat Apr 26 17:34:10 2008
@@ -468,9 +468,23 @@
break;
default:
- /* Tell the connection that one of its handles is being moved */
- orthconn_move_handle(&transition->orth, handle, newpos, cp, reason,
- modifiers);
+ {
+ int n = transition->orth.numpoints/2;
+ Point p1, p2;
+ p1.x = 0.5 * (transition->orth.points[n-1].x + transition->orth.points[n].x);
+ p1.y = 0.5 * (transition->orth.points[n-1].y + transition->orth.points[n].y);
+
+ /* Tell the connection that one of its handles is being moved */
+ orthconn_move_handle(&transition->orth, handle, newpos, cp, reason, modifiers);
+ /* with auto-routing the number of points may have changed */
+ n = transition->orth.numpoints/2;
+ p2.x = 0.5 * (transition->orth.points[n-1].x + transition->orth.points[n].x);
+ p2.y = 0.5 * (transition->orth.points[n-1].y + transition->orth.points[n].y);
+ point_sub(&p2, &p1);
+
+ point_add(&transition->trigger_text_pos, &p2);
+ point_add(&transition->guard_text_pos, &p2);
+ }
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]