Skip to content

Commit efedb74

Browse files
committed
Merge origin/tmm-dev into tmm-dev
2 parents fca03ad + 2867f7d commit efedb74

File tree

2 files changed

+37
-3
lines changed

2 files changed

+37
-3
lines changed

source/GM-TE/GMTEEditor.class.st

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ GMTEEditor >> brushButtons: anObject [
373373

374374
{
375375
#category : #building,
376-
#'squeak_changestamp' : 'TW 7/9/2024 18:15'
376+
#'squeak_changestamp' : 'mcjj 7/11/2024 16:15'
377377
}
378378
GMTEEditor >> buildWith: builder [
379379
"builds the editor with ToolBuilder"
@@ -393,7 +393,9 @@ GMTEEditor >> buildWith: builder [
393393
self createInspectorSpecWithBuilder: builder};
394394
closeAction: #onClose;
395395
minimumExtent: GMTEEditor editorMinimumExtent).
396-
396+
397+
newMorph addKeyboardCaptureFilter: self.
398+
397399
self commandBar: (newMorph submorphNamed: 'command bar').
398400
"self commandBar vResizing: #rigid."
399401
self tileStore: (newMorph submorphNamed: 'tile store').
@@ -1022,6 +1024,36 @@ GMTEEditor >> exportMenu [
10221024
builder open: aMenuSpec
10231025
]
10241026

1027+
{
1028+
#category : #'input handling',
1029+
#'squeak_changestamp' : 'mcjj 7/11/2024 15:57'
1030+
}
1031+
GMTEEditor >> filterEvent: aKeyboardEvent for: anObject [
1032+
| key |
1033+
1034+
aKeyboardEvent isKeystroke
1035+
ifFalse: [^ aKeyboardEvent].
1036+
1037+
key := aKeyboardEvent key.
1038+
1039+
aKeyboardEvent commandKeyPressed ifTrue: [
1040+
aKeyboardEvent shiftPressed
1041+
ifTrue: [
1042+
key caseOf: {
1043+
[$Z] -> [self redo].
1044+
} otherwise: [^ aKeyboardEvent "no hit"].
1045+
^ aKeyboardEvent ignore "hit"]
1046+
ifFalse: [
1047+
key caseOf: {
1048+
[$Z] -> [self undo].
1049+
[$Y] -> [self redo].
1050+
[$R] -> [self rotateSelectedTile].
1051+
} otherwise: [^ aKeyboardEvent "no hit"].
1052+
^ aKeyboardEvent ignore "hit"]].
1053+
1054+
^ aKeyboardEvent "no hit"
1055+
]
1056+
10251057
{
10261058
#category : #accessing,
10271059
#'squeak_changestamp' : 'TW 7/9/2024 17:14'

source/GM-TE/GMTEEditorTileMap.class.st

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ GMTEEditorTileMap >> mouseMove: anEvent [
153153

154154
{
155155
#category : #'event handling',
156-
#'squeak_changestamp' : 'JS 7/11/2024 14:11'
156+
#'squeak_changestamp' : 'mcjj 7/11/2024 16:20'
157157
}
158158
GMTEEditorTileMap >> mouseUp: anEvent [
159159

@@ -164,7 +164,9 @@ GMTEEditorTileMap >> mouseUp: anEvent [
164164
self updateTiles: (indicesToAdd asCollection) inLayer: activeLayer FromEvent: anEvent.
165165
self model brush resetOutputSet.
166166
(self previousTileStates isEmpty) ifFalse: [self saveTileEditChanges].
167+
self tileSelectionSet clearAllHighlightings.
167168
self tileSelectionSet highlightImage: (self model selectedTile)
169+
168170
]
169171

170172
{

0 commit comments

Comments
 (0)