diff --git a/repository/OpenPonk-Core/OPController.class.st b/repository/OpenPonk-Core/OPController.class.st index cbe542e4..0ecd8f8c 100644 --- a/repository/OpenPonk-Core/OPController.class.st +++ b/repository/OpenPonk-Core/OPController.class.st @@ -284,11 +284,11 @@ OPController >> removeControllerAndModel [ { #category : 'destruction' } OPController >> removeDependentConrollersAndModels [ - self dependentControllers - do: [ :each | - self diagramController controllers - detect: [ :ctrl | ctrl model = each model ] - ifFound: #removeControllerAndModel ] + + self dependentControllers do: [ :each | + self diagramController + controllerForModel: each model + ifFound: [ :found | found removeControllerAndModel ] ] ] { #category : 'destruction' }