diff --git a/repository/OpenPonk-ClassEditor/OPUmlAssociationController.class.st b/repository/OpenPonk-ClassEditor/OPUmlAssociationController.class.st index 9cf06b61..0fd266a2 100644 --- a/repository/OpenPonk-ClassEditor/OPUmlAssociationController.class.st +++ b/repository/OpenPonk-ClassEditor/OPUmlAssociationController.class.st @@ -155,9 +155,16 @@ OPUmlAssociationController >> writeMultiplicityFrom: aString to: aProperty [ { #category : 'writing' } OPUmlAssociationController >> writeNavigability: isNavigable to: aProperty [ + isNavigable - ifTrue: [ aProperty owningClass: aProperty opposite type. - aProperty owningAssociation: nil ] - ifFalse: [ aProperty owningClass: nil. - aProperty owningAssociation: aProperty association ] + ifTrue: [ + aProperty owningClass: aProperty opposite type. + aProperty owningAssociation: nil. + self diagramController showInDiagramModel: aProperty ] + ifFalse: [ + aProperty owningClass: nil. + aProperty owningAssociation: aProperty association. + self diagramController + controllerForModel: aProperty + ifFound: [ :found | found removeControllerAndDiagramElement ] ] ] diff --git a/repository/OpenPonk-ClassEditor/OPUmlAssociationControllerTest.class.st b/repository/OpenPonk-ClassEditor/OPUmlAssociationControllerTest.class.st index 5e4b9204..887879f9 100644 --- a/repository/OpenPonk-ClassEditor/OPUmlAssociationControllerTest.class.st +++ b/repository/OpenPonk-ClassEditor/OPUmlAssociationControllerTest.class.st @@ -70,8 +70,10 @@ OPUmlAssociationControllerTest >> testRemovalOfAssociationRemovesMemberEnds [ { #category : 'tests' } OPUmlAssociationControllerTest >> testWriteNavigabilityAssocOwnedToClassOwned [ + | first second | self prepareToShow. + controller diagramController: diagramController. first := model memberEnds first. second := model memberEnds second. controller writeNavigability: true to: second. @@ -83,6 +85,7 @@ OPUmlAssociationControllerTest >> testWriteNavigabilityAssocOwnedToClassOwned [ OPUmlAssociationControllerTest >> testWriteNavigabilityClassOwnedToAssocOwned [ | first | self prepareToShow. + controller diagramController: diagramController. first := model memberEnds first. controller writeNavigability: false to: first. self deny: first isNavigable.