Skip to content

Commit

Permalink
Merge 8227976
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Oct 28, 2024
2 parents 1abddeb + 8227976 commit b52e237
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 2 additions & 0 deletions repository/OpenPonk-FSM/OPFsmSimulator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ OPFsmSimulator >> initializePresenters [
{ #category : 'as yet unclassified' }
OPFsmSimulator >> initializeWindow: aWindow [

super initializeWindow: aWindow.
aWindow initialExtent: 400 @ 300.
aWindow title: 'Finite State Machine Simulator'
]
Expand Down Expand Up @@ -201,6 +202,7 @@ OPFsmSimulator >> nextButton [
OPFsmSimulator >> openOn: aDiagramController [

diagramController := aDiagramController.
self application: aDiagramController editor application.
self open
]

Expand Down
8 changes: 8 additions & 0 deletions repository/OpenPonk-FSM/OPFsmStateShape.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ Class {
#tag : 'Shapes'
}

{ #category : 'removing' }
OPFsmStateShape >> removeRender [

super removeRender.
label := nil.
innerCircle := nil
]

{ #category : 'accessing' }
OPFsmStateShape >> renderBasicShape [

Expand Down
3 changes: 1 addition & 2 deletions repository/OpenPonk-FSM/OPFsmTransitionController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ OPFsmTransitionController >> diagramElementClass [
OPFsmTransitionController >> internalSubscribeTo: aModel [

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

{ #category : 'testing' }
Expand All @@ -36,7 +36,6 @@ OPFsmTransitionController >> modelClass [
{ #category : 'destruction' }
OPFsmTransitionController >> removeModel [

self model announcer unsubscribe: self.
self diagramController model remove: self model.
super removeModel
]
12 changes: 10 additions & 2 deletions repository/OpenPonk-FSM/OPFsmVertexController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ OPFsmVertexController >> hookDiagramElement [
OPFsmVertexController >> internalSubscribeTo: aModel [

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

{ #category : 'testing' }
Expand All @@ -97,7 +97,15 @@ OPFsmVertexController >> isHideable [
{ #category : 'destruction' }
OPFsmVertexController >> removeModel [

self model announcer unsubscribe: self.
self diagramController model remove: self model.
super removeModel
]

{ #category : 'figures' }
OPFsmVertexController >> unhookDiagramElement [

super unhookDiagramElement.

(self diagramElement ifNotExists: [ ^ self ])
adornmentCreationBlock: [ :builder | ]
]

0 comments on commit b52e237

Please sign in to comment.