Feature request #19832
Delete layers/files rather than remove
|Pull Request or Patch supplied:||No||Resolution:||worksforme|
|Easy fix?:||No||Copied to github as #:||27656|
There are some stackexchange questions about this with some code.
Rather than right clicking and removing layers, can we have the option to Delete them, so you don't have multiple duplicate/not needed files around.
I think this is more useful for commercial users, as it can be hard to determine what is still useful or junk data after the user who created the layers has finished his work.
The stackexchange tickets list how to delete shapefile but the scripts may need be converted in QGIS 3.0 as there has been an API break ect..
#2 Updated by Tom na almost 3 years ago
- Status changed from Closed to Reopened
I can't edit the existing ticket, but I was referring to the QGIS Desktop application and not having to use browser or other programs.
I am thinking of making it easier to delete files within a QGIS project whilst you are doing work.
Thank you, sorry for the delay in the update. I should have made it clearer in the ticket
#4 Updated by Tom na almost 3 years ago
Alessandro Pasotti wrote:
Tom, when we say "browser" we mean the QGIS internal browser dock widget (usually show in the top left corner of the application and always shown in the data source manager dialog).
Does it work for you?
I see what you mean with browser, that is slightly easier than using file explorer (windows) to find the files after you have removed the layers.
However using QGIS 3.2.2-1 when using browser/browser 2 dock widget, the .cpg and .qpj files are not deleted, (perhaps I should raise that as a bug.)
I was hoping to add an option into Layer dock widget, so remove/and delete, as you still need to navigate to the file in the browser dock widget.