Skip to content

Commit

Permalink
Applying permutation does update and updates fixed in tab usage
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeAtHPI committed Jan 25, 2024
1 parent ec3fba3 commit 9e659df
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/Sandblocks-Babylonian/Morph.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Morph class >> exampleObject [
]

{ #category : #'*Sandblocks-Babylonian' }
Morph >> listensToPermutations [
Morph >> listensToPermutations [

^ false
]
Expand Down
5 changes: 3 additions & 2 deletions packages/Sandblocks-Babylonian/SBExampleCluster.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ SBExampleCluster >> extractedTopHeadingsFrom: aSBMultiverse [

^ (aSBMultiverse universes collect: [:aUniverse |
self newContainerMorph
listDirection: #leftToRight;
addAllMorphsBack: {
SBPermutationLabel newDisplaying: aUniverse activePermutation.
SBButton newApplyPermutationFor: aUniverse activePermutation}])
SBButton newApplyPermutationFor: aUniverse activePermutation.
SBPermutationLabel newDisplaying: aUniverse activePermutation}])
]

{ #category : #accessing }
Expand Down
2 changes: 1 addition & 1 deletion packages/Sandblocks-Babylonian/SBPermutationLabel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SBPermutationLabel class >> newDisplaying: aSBPermutation [
]

{ #category : #'*Sandblocks-Babylonian' }
SBPermutationLabel >> listensToPermutations [
SBPermutationLabel >> listensToPermutations [

^ true
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Extension { #name : #SBPermutationLabel }

{ #category : #'*Sandblocks-Babylonian' }
SBPermutationLabel >> listensToPermutations [
SBPermutationLabel >> listensToPermutations [

^ true
]
8 changes: 8 additions & 0 deletions packages/Sandblocks-Core/SBTabView.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ SBTabView >> addTab [
self add: (self active veryDeepCopy name: self activeName, '_i')
]

{ #category : #'submorphs - enumerating' }
SBTabView >> allMorphsDepthFirstDo: aBlock [

submorphs do: [:m | m allMorphsDepthFirstDo: aBlock].
(self namedBlocks reject: [:m | m = self active]) do: [:m | m block allMorphsDepthFirstDo: aBlock].
aBlock value: self
]

{ #category : #ui }
SBTabView >> asTabButton: aNamedBlock [

Expand Down
3 changes: 1 addition & 2 deletions packages/Sandblocks-Morphs/SBButton.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ SBButton class >> newApplyPermutationFor: aPermutation [
size: 8.0 sbScaled;
color: (Color r: 0.0 g: 1 b: 0.0))
label: 'Apply'
do: [aPermutation apply.
self sandblockEditor sendNewPermutationNotification];
do: [aPermutation apply];
makeSmall;
cornerStyle: #squared
]
Expand Down
3 changes: 3 additions & 0 deletions packages/Sandblocks-Utils/SBPermutation.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ SBPermutation >> apply [
self referencedVariants do: [:aVariant | aVariant switchToAlternative: (self at: aVariant id)].
(Set newFrom: (referencedVariants collect: #containingArtefact thenSelect: #isMethod))
do: [:aMethodBlock | aMethodBlock sandblockEditor save: aMethodBlock tryFixing: true quick: true].
((Set newFrom: (referencedVariants collect: #sandblockEditor))
reject: #isNil)
do: #sendNewPermutationNotification
]

{ #category : #converting }
Expand Down

0 comments on commit 9e659df

Please sign in to comment.