[dia] Fix 'UML - Component Feature' screwing the obj->connections
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Fix 'UML - Component Feature' screwing the obj->connections
- Date: Wed, 3 Oct 2012 20:02:56 +0000 (UTC)
commit 93dba37262342ec87af1fb136586c3bee0e67e76
Author: Hans Breuer <hans breuer org>
Date: Tue Oct 2 17:26:09 2012 +0200
Fix 'UML - Component Feature' screwing the obj->connections
it was assuming to be the only one to add connection points,
but that's not true anymore (after NewOrthConn merge?)
objects/UML/component_feature.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/objects/UML/component_feature.c b/objects/UML/component_feature.c
index aaca9e0..e493102 100644
--- a/objects/UML/component_feature.c
+++ b/objects/UML/component_feature.c
@@ -406,8 +406,9 @@ compfeat_create(Point *startpoint,
if (compfeat->role == COMPPROP_FACET
|| compfeat->role == COMPPROP_EVENTSOURCE) {
+ int pos = obj->num_connections;
object_add_connectionpoint(&orth->object, &compfeat->cp);
- obj->connections[0] = &compfeat->cp;
+ obj->connections[pos] = &compfeat->cp;
compfeat->cp.object = obj;
compfeat->cp.connected = NULL;
}
@@ -424,6 +425,12 @@ compfeat_create(Point *startpoint,
static void
compfeat_destroy(Compfeat *compfeat)
{
+ OrthConn *orth = &compfeat->orth;
+
+ if (compfeat->role == COMPPROP_FACET
+ || compfeat->role == COMPPROP_EVENTSOURCE) {
+ object_remove_connectionpoint(&orth->object, &compfeat->cp);
+ }
text_destroy(compfeat->text);
orthconn_destroy(&compfeat->orth);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]