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> {
2247
2247
? Object . keys ( selectedLayers ) [ 0 ]
2248
2248
: undefined ;
2249
2249
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
+ }
2253
2260
}
2254
2261
} ;
2255
2262
You can’t perform that action at this time.
0 commit comments