2

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?

3
  • 1
    What have you tried so far? have you closed and opened the program, tried deleted the project file? starting a new project file? Commented 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). Commented 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 C
    Commented Jan 7, 2017 at 1:10

2 Answers 2

3
  1. select the relevant layer in the Layer Panel and activate the editing
  2. Select the orphan line segment with the selection tool in the editing toolbar
  3. Press the delete key of your key board

That's all.

2
  • And when you've removed all relevant orphan lines, deactivate the editing and save the layer
    – user29366
    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 C
    Commented Jan 7, 2017 at 0:43
0

This worked for me. 1. Save the project 2. Close QGIS 3. Restart QGIS 4. Reload the project and the lines have disappeared.

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.