Bug report #16476
DB Manager: previewing layers in Virtual layers section remove them from the Layers panel
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | DB Manager | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | Yes | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 24385 |
Description
Open a project
Launch DB Manager, expand the Virtual layers section, then QGIs layers and select a layer
Click the Preview tab
Select another layer
The layer you selected first has been removed from the Layers panel, hence from the project (GUI, at least)
Happens also in master
Set the report as high because this can easily corrupt the project if you don't notice the removal (and anyway, if you notice it, you'll need to close and not save the project to avoid it being corrupted)
Related issues
History
#1 Updated by Harrissou Santanna over 7 years ago
- Subject changed from DB Manager: previewing layers remove them from the Layers panel to DB Manager: previewing layers in Virtual layers section remove them from the Layers panel
#2 Updated by Giovanni Manghi over 7 years ago
- Regression? set to No
- Easy fix? set to No
#3 Updated by Giovanni Manghi over 7 years ago
- Description updated (diff)
- Crashes QGIS or corrupts data changed from No to Yes
#4 Updated by Luigi Pirelli over 7 years ago
the problem is a logic problem... the db_manager base class layer_preview remove from registry any previously added layer (currentLayer) with it's id, with assumption that it's id is a temporary layer because has been added for the preview.
virtual layer qgis layer is populated of all registry layers => also that are in the layer list, when you click on that it become current layer => it is removed when switching to another layer in db_manager
looking for a simple solution for that
#5 Updated by Giovanni Manghi over 7 years ago
see also #16534
#6 Updated by Luigi Pirelli over 7 years ago
- Pull Request or Patch supplied changed from No to Yes
fixed for 2.18 https://github.com/qgis/QGIS/pull/4534 waiting for review and merge, expecially review by Hugo Mercier.
fix for 3.0 will be delayed because actually in this version db_manager raise much more exception than the 2.18 or 2.14 one => I'll try to work in a general PR fixup most common one.
#7 Updated by Jürgen Fischer over 7 years ago
- Duplicated by Bug report #16534: DB manager virtual layers: wrong list, layers removed from project added
#8 Updated by Salvatore Larosa over 7 years ago
- Status changed from Open to Closed
Applied in changeset qgis|dae921c51f85f2dde2bab9b18a0d7c7c31bc700b.
#9 Updated by Harrissou Santanna almost 7 years ago
- Status changed from Closed to Reopened
- Affected QGIS version changed from 2.18.7 to master
Looks like the fix for QGIS 3 never landed
#10 Updated by Salvatore Larosa almost 7 years ago
- % Done changed from 0 to 100
- Status changed from Reopened to Closed
Applied in changeset qgis|68b7bf6aa8c94d4cbf56e600fcb57f1f750ddcc9.
#11 Updated by Giovanni Manghi over 6 years ago
- Resolution set to fixed/implemented