From e7575c655f293902a5e6c66ebf1e1964becc568e Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Mon, 8 Jul 2019 15:36:45 +0200 Subject: [PATCH] Do not use perform to create new splitters. Fixes #643 --- src/Spec2-Adapters-Morphic/SpLayoutDirection.extension.st | 5 +++++ .../SpLayoutDirectionHorizontal.extension.st | 5 +++++ .../SpLayoutDirectionVertical.extension.st | 5 +++++ src/Spec2-Adapters-Morphic/SpMorphicPanedAdapter.class.st | 4 ++-- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Spec2-Adapters-Morphic/SpLayoutDirection.extension.st b/src/Spec2-Adapters-Morphic/SpLayoutDirection.extension.st index d40d7f927..7e11928cf 100644 --- a/src/Spec2-Adapters-Morphic/SpLayoutDirection.extension.st +++ b/src/Spec2-Adapters-Morphic/SpLayoutDirection.extension.st @@ -1,5 +1,10 @@ Extension { #name : #SpLayoutDirection } +{ #category : #'*Spec2-Adapters-Morphic' } +SpLayoutDirection >> newSplitter [ + ^ self subclassResponsibility +] + { #category : #'*Spec2-Adapters-Morphic' } SpLayoutDirection >> setRigidityOfNonExpendedMorph: aMorph [ self subclassResponsibility diff --git a/src/Spec2-Adapters-Morphic/SpLayoutDirectionHorizontal.extension.st b/src/Spec2-Adapters-Morphic/SpLayoutDirectionHorizontal.extension.st index 943bc133b..81f9f1594 100644 --- a/src/Spec2-Adapters-Morphic/SpLayoutDirectionHorizontal.extension.st +++ b/src/Spec2-Adapters-Morphic/SpLayoutDirectionHorizontal.extension.st @@ -1,5 +1,10 @@ Extension { #name : #SpLayoutDirectionHorizontal } +{ #category : #'*Spec2-Adapters-Morphic' } +SpLayoutDirectionHorizontal >> newSplitter [ + ^ SpPanedResizerMorph newHorizontal +] + { #category : #'*Spec2-Adapters-Morphic' } SpLayoutDirectionHorizontal >> setRigidityOfNonExpendedMorph: aMorph [ aMorph diff --git a/src/Spec2-Adapters-Morphic/SpLayoutDirectionVertical.extension.st b/src/Spec2-Adapters-Morphic/SpLayoutDirectionVertical.extension.st index b067a779b..66e03a98d 100644 --- a/src/Spec2-Adapters-Morphic/SpLayoutDirectionVertical.extension.st +++ b/src/Spec2-Adapters-Morphic/SpLayoutDirectionVertical.extension.st @@ -1,5 +1,10 @@ Extension { #name : #SpLayoutDirectionVertical } +{ #category : #'*Spec2-Adapters-Morphic' } +SpLayoutDirectionVertical >> newSplitter [ + ^ SpPanedResizerMorph newVertical +] + { #category : #'*Spec2-Adapters-Morphic' } SpLayoutDirectionVertical >> setRigidityOfNonExpendedMorph: aMorph [ aMorph diff --git a/src/Spec2-Adapters-Morphic/SpMorphicPanedAdapter.class.st b/src/Spec2-Adapters-Morphic/SpMorphicPanedAdapter.class.st index dea87adc6..31ce94e1c 100644 --- a/src/Spec2-Adapters-Morphic/SpMorphicPanedAdapter.class.st +++ b/src/Spec2-Adapters-Morphic/SpMorphicPanedAdapter.class.st @@ -25,9 +25,9 @@ SpMorphicPanedAdapter >> addConstraits: constraints toChild: childMorph [ { #category : #private } SpMorphicPanedAdapter >> addSplitterIn: aPanel for: childMorph [ - + aPanel submorphs size = 1 ifFalse: [ ^ self ]. - aPanel addMorphBack: (SpPanedResizerMorph perform: self selector) + aPanel addMorphBack: self direction newSplitter ] { #category : #private }