summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlprotocolconformance.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/qumlprotocolconformance.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/qumlprotocolconformance.cpp')
-rw-r--r--src/uml/qumlprotocolconformance.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/uml/qumlprotocolconformance.cpp b/src/uml/qumlprotocolconformance.cpp
index 3fcffcc4..3eeaeabc 100644
--- a/src/uml/qumlprotocolconformance.cpp
+++ b/src/uml/qumlprotocolconformance.cpp
@@ -75,7 +75,15 @@ void QUmlProtocolConformance::setGeneralMachine(QUmlProtocolStateMachine *genera
// This is a read-write association end
if (_generalMachine != generalMachine) {
+ // Adjust subsetted properties
+ removeTarget(_generalMachine);
+
_generalMachine = generalMachine;
+
+ // Adjust subsetted properties
+ if (generalMachine) {
+ addTarget(generalMachine);
+ }
}
}
@@ -94,7 +102,16 @@ void QUmlProtocolConformance::setSpecificMachine(QUmlProtocolStateMachine *speci
// This is a read-write association end
if (_specificMachine != specificMachine) {
+ // Adjust subsetted properties
+ removeSource(_specificMachine);
+
_specificMachine = specificMachine;
+
+ // Adjust subsetted properties
+ setOwner(specificMachine);
+ if (specificMachine) {
+ addSource(specificMachine);
+ }
}
}