1

How can I remove "red lines" that become permanent to my map canvas while trying to digitize different shapes. The program just leaves the outline of what I'm trying to draw. It still remains even if I close all of the layers and empty everything. I've encountered this error numerous of times when creating circles, lines etc.

  • 1
    What are those "red lines"? Can you add a screenshot? – Fran Raga Jul 18 at 7:42
0

I've tried something but the shortest way I found is using Python Console.

I realized when I draw something, QGIS adds that drawing as a QGraphicsItem object to map canvas scene in first order. Try this:

  • Open Python Console in QGIS
  • Copy-Paste the line below

    iface.mapCanvas().scene().removeItem(iface.mapCanvas().scene().items()[0])
    
  • If map canvas has multiple items like you mentioned, run the code line again. If it hasn't, don't run again, otherwise you may encounter unexpected results.

  • I tried that line you suggested but when I run it QGIS just crashes.. I figures how to make the " red line" appear. You start drawing a line and before finishing it you click for example "add ring" icon. – Henri Jul 18 at 10:23
  • Adding a screenshot and specifying which tool you use when getting that error may be helpful for users to answer the question correctly. – Kadir Şahbaz Jul 19 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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