Skip to content

Commit ba04da5

Browse files
authored
Merge pull request #1907 from pharo-spec/dev-3.0
fix a couple of errors I introduced when fixing FTTableMorph double click
2 parents 6640b38 + 44b27c9 commit ba04da5

3 files changed

Lines changed: 15 additions & 11 deletions

File tree

src/Spec2-Backend-Tests/SpMorphicBackendForTest.class.st

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,23 @@ SpMorphicBackendForTest >> denyHasHeader: anAdapter [
9696

9797
{ #category : 'simulating' }
9898
SpMorphicBackendForTest >> doubleClickFirstRowAndColumn: anAdapter [
99+
| event position |
99100

100101
self waitUntilUIRedrawed.
101102

102-
anAdapter widget doubleClick: (MouseButtonEvent new
103-
setPosition: anAdapter widget submorphs first submorphs first bounds center;
104-
yourself).
105-
103+
position := anAdapter widget submorphs first submorphs first bounds center.
104+
event := MouseButtonEvent new
105+
setType: #mouseDown
106+
position: position
107+
buttons: 0
108+
hand: HandMorph new;
109+
yourself.
110+
111+
"simulating double click means send one mouseDown: and one double-click because
112+
when doing a real one, we always receive the first click then the one we want."
113+
anAdapter widget
114+
mouseDown: event;
115+
doubleClick: event
106116
]
107117

108118
{ #category : 'initialization' }

src/Spec2-Commander2/CmUICommand.extension.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CmUICommand >> id [
99
self shortcutKey
1010
ifNotNil: [ 'shortcut ', (KMShortcutPrinter toString: self shortcutKey) ]
1111
ifNil: [ 'unknown' ] ].
12-
parts := name substrings: ' :'.
12+
parts := name substrings: ' :()'.
1313
stream << parts first asLowercase.
1414
parts allButFirstDo: [ :each | stream << each capitalized ] ]
1515
]

src/Spec2-Commander2/SpCommand.class.st

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,6 @@ SpCommand >> isEnabled [
160160
^ self canBeExecuted
161161
]
162162

163-
{ #category : 'testing' }
164-
SpCommand >> isVisible [
165-
166-
^ self canBeExecuted
167-
]
168-
169163
{ #category : 'accessing' }
170164
SpCommand >> presenter [
171165
^ presenter

0 commit comments

Comments
 (0)