Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package Layers Algorithm Not Honoring Save only selected features for Layers with no Selected Features #50400

Closed
2 tasks done
ar-siddiqui opened this issue Sep 29, 2022 · 0 comments · Fixed by #53390
Closed
2 tasks done
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@ar-siddiqui
Copy link

ar-siddiqui commented Sep 29, 2022

What is the bug or the crash?

If no features are selected in certain layers, the package layer algorithm will save all features. This is not what a user would expect. In my use case, I have many layers in a project, I selected features from all layers for a small sub-area and want to export all selected features in all layers as separate layers in a GPKG. Package Layers algorithm would have worked if not for this bug.

Steps to reproduce the issue

  1. Create two layers

  2. Select features from one layer and no feature from the second layer
    image

  3. Run Package layers algorithm with Save only selected features checked
    image

  4. Resulting GPKG would have all features for layer with 0 feature selected
    image

Versions

QGIS version
3.26.2-Buenos Aires
QGIS code revision
feec3d3
Qt version
5.15.3
Python version
3.9.5
GDAL/OGR version
3.5.1
PROJ version
9.0.1
EPSG Registry database version
v10.064 (2022-05-19)
GEOS version
3.10.3-CAPI-1.16.1
SQLite version
3.38.1
PDAL version
2.4.2
PostgreSQL client version
unknown
SpatiaLite version
5.0.1
QWT version
6.1.6
QScintilla2 version
2.13.1
OS version
Windows 10 Version 1909

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

IMO for layers with 0 selection, no features should be saved or the layer not created at all.

@ar-siddiqui ar-siddiqui added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 29, 2022
@nicogodet nicogodet added the Processing Relating to QGIS Processing framework or individual Processing algorithms label Sep 29, 2022
nyalldawson pushed a commit that referenced this issue Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants