Bug report #19555
DWG import overwrites existing Geopackage without warning
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Jürgen Fischer | ||
Category: | DWG/DXF import | ||
Affected QGIS version: | 3.2.1 | Regression?: | No |
Operating System: | all | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 27382 |
Description
The DWG import function to reads a DWG/DXF file and imports into a Geopackage file. If an existing gpkg file is chosen, it is silently overwritten. A warning should be issued.
Furthermore, when opening the "DWG Import" dialog, the previously used gpkg file persists in the Geopackage textbox, so the danger of accidentally overwriting is increased. That dialog should be initialized with all textboxes empty by default.
Associated revisions
Fixes #19555
Adds a QMessageBox if file exists
Remove lastDatabase setting to lastDirDatabase. It's dangerous to reuse
the last database.
Adds a .gpkg extension to filename if not presents.
History
#1 Updated by Jürgen Fischer about 6 years ago
Why is that dangerous? You can always reimport the original DWG.
#2 Updated by Micha Silver about 6 years ago
- In QGIS (and most applications) a user never expects her files to be overwritten without a warning, and a chance to OK/Cancel.
- If I import a second DWG file, it's very easy to overlook the file name from the first DWG that persists in the "Geopackage" text box, and then overwrite that earlier gpkg by accident.
I think that the expected behavior should be: the Geopackage text box should be empty with each invocation of the DWG/DXF Import dialogue, and always issue a warning when overwriting.
THanks
#3 Updated by Anonymous about 6 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|b74292aaaeed37ccc20f74ebb12ba364218db149.