I am trying to draw a line in QGIS3. I create the appropriate Shapefile layer, click on the editing pencil, select add feature and draw the line. However the resulting line does not seem to be drawn in the shapefile layer. I can see the line but can't select it or delete it. When I make all the layers invisible the line remains, as if it's not attached to any layer but just on the canvas. I can't save the shapefile layer, presumably because it thinks nothing has been added because the line is somehow elsewhere. Any ideas?