Skip to content

Commit

Permalink
Merge origin/tmm-dev into tmm-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksander Morgensterns committed Jul 1, 2024
2 parents 8030100 + 0aa6ad1 commit bef9bd4
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions source/GM-TE/GMTETileMap.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,29 @@ GMTETileMap class >> maxLayers [

{
#category : #'as yet unclassified',
#'squeak_changestamp' : 'jj 6/22/2024 16:21'
#'squeak_changestamp' : 'JS 6/28/2024 15:19'
}
GMTETileMap class >> newFromEditableTileMap: aMap [

| newMap |
| newMap oldMapCopy |
aMap tileSelectionSet clearAllHighlightings.

aMap tileMatrixStackBackground reset. "This fixed the temporary issue of orphaned morphs after copy"

newMap := (GMTETileMap newFrom: (aMap veryDeepCopy))
oldMapCopy := aMap veryDeepCopy.

newMap := (GMTETileMap newFrom: oldMapCopy)
updateMap;
hideHighlightingLayer;
removeAllMorphs;
yourself.

aMap generateBackgroundTiles. "Part of the above fix"

oldMapCopy
submorphsDo: [:s | newMap addMorph: s];
abandon.

aMap generateBackgroundTiles. "Part of the above fix"
newMap generateBackgroundTiles.
^ newMap
]

Expand Down

0 comments on commit bef9bd4

Please sign in to comment.