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

Fix select all features in attribute table #57140

Conversation

vaahtokarkki
Copy link
Contributor

@vaahtokarkki vaahtokarkki commented Apr 12, 2024

Description

Select all action in attribute table selects all features from layer and disrespects any filtering done in the attribute table dialog. With this PR, the select all action will select all features visible in the table.

Fixes #53150
Fixes #55781 as copying features not present in the attribute table yields null values.

Copy link
Contributor

@Joonalai Joonalai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@github-actions github-actions bot added this to the 3.38.0 milestone Apr 12, 2024
@agiudiceandrea agiudiceandrea added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Apr 14, 2024
When selecting all features in attribute table, select only features
visible in the table instead of all features in layer. Fixes qgis#55781 and qgis#53150
@vaahtokarkki vaahtokarkki force-pushed the fix-select-all-in-attribute-table branch from e5109b0 to 11db401 Compare April 15, 2024 05:59
@elpaso
Copy link
Contributor

elpaso commented Apr 17, 2024

Nice work indeed, but it seems to me that there is no consent over the expected behavior here: I have the feeling that all in "Select All" means select all features (including filtered out).

@vaahtokarkki
Copy link
Contributor Author

Yeah that probably is the case, as it is discussed in #55781 (even though one could argue it to be a bit unexpected behaviour).

Btw @elpaso, could you please review also my other PR #56825 that has been hanging there for over a month already? It should be just a simple bug fix and not a feature request as this turned out to be.

@bloqbreaker
Copy link

Nice work indeed, but it seems to me that there is no consent over the expected behavior here: I have the feeling that all in "Select All" means select all features (including filtered out).

While I agree that 'all' means 'all', I believe the question here to be about the context. I stumbled over this topic after having it happening to me as well, because in the context of a filtered attribute table 'all' to me means all that is currently shown in the table >after< filtering. As humans being a creature that a) relies heavily on visual information, even more so when working at a monitor, where we have almost exclusively visual info, and b) relying on context of a situation, I would argue that 'select all' selecting everything, even what might not currently be visible is a fatal UI design flaw. Especially because it appears to happen to many more people than me, else there wouldn't be a discussion. And there is no warning at any point, no info about the extend of what you have selected or otherwise.

I'll continue this at the other (somewhat longer) discussion (#55781) though if I feel like it. Right now I'm just super bummed out and have to try and rescue some data and/or redo everything I have done so far...

@vaahtokarkki
Copy link
Contributor Author

@bloqbreaker Thanks for the comment, and sorry for any data loss! I highly encourage you to also comment in the longer discussion in the issue you linked, as the comments here might go unnoticed.

One thing I didn't mention in the previous comments: maybe the most problematic issue might be the Ctrl+A shortcut, which is tied to the unexpected behavior of the 'Select All' action in the context of the attribute table. I find it hard to argue why Ctrl+A should select anything else than the contents of the attribute table.

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!
Projects
None yet
5 participants