Skip to content

Commit

Permalink
reworked subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Oct 23, 2024
1 parent c180198 commit cc84ffc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ OPBPMNDataObjectController >> internalSubscribeTo: aModel [

super internalSubscribeTo: aModel.
aModel
when: OPBPMNPlaceTokensChanged
weakWhen: OPBPMNPlaceTokensChanged
send: #modelChanged
to: self
]
Expand Down
2 changes: 1 addition & 1 deletion repository/OpenPonk-BPMN/OPBPMNEdgeController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ OPBPMNEdgeController >> headMarker [
OPBPMNEdgeController >> internalSubscribeTo: aModel [

super internalSubscribeTo: aModel.
aModel when: OPElementRemoved send: #removeControllerAndDiagramElement to: self
aModel weakWhen: OPElementRemoved send: #removeControllerAndDiagramElement to: self
]

{ #category : 'private' }
Expand Down
2 changes: 1 addition & 1 deletion repository/OpenPonk-BPMN/OPBPMNElementController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ OPBPMNElementController >> dependentElements [
OPBPMNElementController >> internalSubscribeTo: aModel [

super internalSubscribeTo: aModel.
aModel when: OPBPMNPlaceTokensChanged send: #modelChanged to: self
aModel weakWhen: OPBPMNPlaceTokensChanged send: #modelChanged to: self
]
3 changes: 1 addition & 2 deletions repository/OpenPonk-BPMN/OPBPMNNodeController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ OPBPMNNodeController >> buildEditorForm: aForm [
OPBPMNNodeController >> internalSubscribeTo: aModel [

super internalSubscribeTo: aModel.
aModel when: OPElementRemoved send: #removeControllerAndDiagramElement to: self
aModel weakWhen: OPElementRemoved send: #removeControllerAndDiagramElement to: self
]

{ #category : 'testing' }
Expand All @@ -33,6 +33,5 @@ OPBPMNNodeController >> isHideable [
{ #category : 'private' }
OPBPMNNodeController >> removeModel [

self model announcer unsubscribe: self.
self model owner remove: self model
]

0 comments on commit cc84ffc

Please sign in to comment.