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?
-
1What have you tried so far? have you closed and opened the program, tried deleted the project file? starting a new project file?– KnightshoundCommented Jan 6, 2017 at 11:09
-
Can you post a screenshot? I suspect the line is from a (digitizing) tool and not from a feature on the layer itself (or that would really be strange).– Matthias KuhnCommented Jan 6, 2017 at 14:06
-
Thanks, all. I found if I saved the project, closed QGIS, re-started QGIS and loaded the project, the lines had gone. I should have tried that first, so thanks for your patience with a novice.– Bill CCommented Jan 7, 2017 at 1:10
Add a comment
|
2 Answers
- 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
That's all.
-
And when you've removed all relevant orphan lines, deactivate the editing and save the layer Commented Jan 6, 2017 at 13:20
-
Thanks for the reply, user 29366. However, there is no layer in the Layer Panel but the lines are still on the canvas.– Bill CCommented Jan 7, 2017 at 0:43
This worked for me. 1. Save the project 2. Close QGIS 3. Restart QGIS 4. Reload the project and the lines have disappeared.