File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
packages/base/src/mainview Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -2247,9 +2247,16 @@ export class MainView extends React.Component<IProps, IStates> {
22472247 ? Object . keys ( selectedLayers ) [ 0 ]
22482248 : undefined ;
22492249 if ( selectedLayerId && selectedLayerId !== this . _previousDrawLayerID ) {
2250- this . _previousDrawLayerID = selectedLayerId ;
2251- this . _currentDrawLayerID = selectedLayerId ;
2252- this . _editVectorLayer ( ) ;
2250+ const selectedLayer = this . _model . getLayer ( selectedLayerId ) ;
2251+ if ( selectedLayer ) {
2252+ if ( this . _model . checkIfIsADrawVectorLayer ( selectedLayer ) ) {
2253+ this . _previousDrawLayerID = selectedLayerId ;
2254+ this . _currentDrawLayerID = selectedLayerId ;
2255+ this . _editVectorLayer ( ) ;
2256+ } else {
2257+ console . warn ( `${ selectedLayer . name } is not editable` ) ;
2258+ }
2259+ }
22532260 }
22542261 } ;
22552262
You can’t perform that action at this time.
0 commit comments