diff --git a/src/GeoView/AbstractGeoViewGraphicModelLayer.class.st b/src/GeoView/AbstractGeoViewGraphicModelLayer.class.st index eaf06f8..d6d0de0 100644 --- a/src/GeoView/AbstractGeoViewGraphicModelLayer.class.st +++ b/src/GeoView/AbstractGeoViewGraphicModelLayer.class.st @@ -271,7 +271,7 @@ AbstractGeoViewGraphicModelLayer >> updateDShapes: aDShapeList [ AbstractGeoViewGraphicModelLayer >> userDataChangesMutex [ ^ userDataChangesMutex ifNil: [ - userDataChangesMutex := Semaphore forMutualExclusion ] + userDataChangesMutex := Monitor new ] ] { #category : #'API -- graphic properties' } diff --git a/src/GeoView/GeoObjectProcessData.class.st b/src/GeoView/GeoObjectProcessData.class.st index 3abf20e..e165e07 100644 --- a/src/GeoView/GeoObjectProcessData.class.st +++ b/src/GeoView/GeoObjectProcessData.class.st @@ -54,7 +54,11 @@ GeoObjectProcessData >> processRecycledData: aKey incoming: aGeoObject with: aDS aDShape key: nil. aDShape removeProperties. - aDShape isComposite ifTrue:[ aDShape removeChildren ]. + aDShape isComposite ifTrue:[ + aDShape dShapeList removeAll. + aDShape toUpdateDShapeList removeAll. + aDShape toDeleteDShapeList removeAll. + ]. ^ aDShape ] diff --git a/src/GeoView/GeoViewDShapesLayer.class.st b/src/GeoView/GeoViewDShapesLayer.class.st index 25876be..afe85fa 100644 --- a/src/GeoView/GeoViewDShapesLayer.class.st +++ b/src/GeoView/GeoViewDShapesLayer.class.st @@ -70,6 +70,21 @@ GeoViewDShapesLayer >> mapProjection: aMapProjection [ "do nothing" ] +{ #category : #private } +GeoViewDShapesLayer >> populatePickingResult: aPickingResult at: index with: aGShape [ + "Way to detect if the gShape is picked" + + | pickingElement data | + pickingElement := super populatePickingResult: aPickingResult at: index with: aGShape. + pickingElement ifNil:[ ^ nil ]. + + "add dShape" + self userDataChangesMutex critical: [ data := self userModel at: index ifAbsent:[ nil ] ]. + pickingElement dShape: data. + + ^ pickingElement +] + { #category : #'API -- DShapes' } GeoViewDShapesLayer >> removeDShape: aDShape [