Using QGIS 2.18.1, I started to create a shapefile layer with a line feature, but then decided not to proceed. I first tried to select and delete the lines but couldn't seem to select them with the select tool. So I then deleted the shapefiles using File Explorer which seemed to go as expected. However, the lines are still on the canvas, and appear to be impossible to delete, and of course are no longer associated with a layer . How can I clear the canvas of these lines?
- select the relevant layer in the Layer Panel and activate the editing
- Select the orphan line segment with the selection tool in the editing toolbar
- Press the delete key of your key board
This worked for me. 1. Save the project 2. Close QGIS 3. Restart QGIS 4. Reload the project and the lines have disappeared.