0

I have a file to which I added a custom shapefile layer to which I added a couple polygons. I saved it, reopened it the other day on a different computer and got an error message saying that the shapefile layer could not be read. I was not able to locate the shapefile anywhere. I deleted the layer. I deleted all the other layers. But the geometry from that shapefile layer persists in my file. I cannot select the features to delete them. Nor can I turn them on or off.

How do I get rid of them?

Screenshot

On this machine: QGIS version 3.22.1-Białowieża QGIS code revision 663dcf8fb9 Qt version 5.15.2 Python version 3.9.5

2 Answers 2

1

You may have accidentally added your polygons to an annotation/graphics layer.

enter image description here

Use the "Modify annotations" tool to select and delete them.

enter image description here

enter image description here

0

I see no layers on the map layer. But the layer is active, so give it a try. Activate your console and type the folowing code to get the path of your layer. Browse to that filepath, close QGIS, delete all files with that name and reopen QGIS.

[f.source() for f in iface.mapCanvas().layers()]

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.