summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlconstraint.cpp
diff options
context:
space:
mode:
authorSandro S. Andrade <sandroandrade@kde.org>2013-08-25 23:35:56 -0300
committerSandro S. Andrade <sandroandrade@kde.org>2013-08-26 04:33:49 +0200
commitb15e532fc664d4c5d91095bb22093a68e3bdfd39 (patch)
tree6ff325651181e9082bf047326d873e07c0e77470 /src/uml/qumlconstraint.cpp
parent5392c0a8ce5545783c86d830e8c321d487538613 (diff)
Add subsetted property adjustment for single-valued properties
Change-Id: Ibea136f1eeccc8a1f3e9dcb1e86cab111daf3c9c Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'src/uml/qumlconstraint.cpp')
-rw-r--r--src/uml/qumlconstraint.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/uml/qumlconstraint.cpp b/src/uml/qumlconstraint.cpp
index 6dd4a20b..7a22ed42 100644
--- a/src/uml/qumlconstraint.cpp
+++ b/src/uml/qumlconstraint.cpp
@@ -105,7 +105,12 @@ void QUmlConstraint::setContext(QUmlNamespace *context)
// This is a read-write association end
if (_context != context) {
+ // Adjust subsetted properties
+
_context = context;
+
+ // Adjust subsetted properties
+ setNamespace(context);
}
}
@@ -124,7 +129,15 @@ void QUmlConstraint::setSpecification(QUmlValueSpecification *specification)
// This is a read-write association end
if (_specification != specification) {
+ // Adjust subsetted properties
+ removeOwnedElement(_specification);
+
_specification = specification;
+
+ // Adjust subsetted properties
+ if (specification) {
+ addOwnedElement(specification);
+ }
}
}