Open celmi opened 8 months ago
Actually, the "Select all" button does what it's supposed to do and that is : Select all. You can select all the filtered features by clicking on the left/top corner of the attribute table.
Adding a button for "Select all filtered" features would be a feature request and not a bug.
Actually, the "Select all" button does what it's supposed to do and that is : Select all.
@tudorbarascu Not really if the pasted data are full of NULL values. The correct behavior would be to paste data as in the layer. There is a bug in the described behavior.
Anyway, it might be worth checking what is actually selected in the map canvas when you press the "Select all" button from a filtered attribute table. Then if you remove the filter within the table, are all the features selected or just the previously filtered ones? Could help clarify what the "Select all" button actually does in a filter context.
I'm mostly with Tudor on this. Select all should select all and it actually selects all. There are however several issues:
I am replying here about my PR #57140 related to this issue.
I found also #53150 issue labelled as a feature request (to be honest I didn't even realize this could be a feature request). As the issue states, the current behaviour of the "Select all" button (and ctrl+a) is counterintuitive in the context of the attribute table. To compare how other software behaves in such a situation, for example Excel: get a table full of data, filter some rows out, ctrl+a: no filtered out rows are selected and possibly copied to clipboard.
Also, the separate button for selecting all filtered features feels a bit unnecessary, as the current behaviour of selecting all features of the layer still exists when "Show all features" is active. At least the select all button should state that it always selects all features in the layer, which it currently does not state. But in this case, if the current behaviour is correct the bug in deed exist as @uclaros described.
To justify PR #57140 and issue #53150 more: currently, the selection toolbar has already a "Select All Features" action, which does exactly what it states. Therefore I see even less reason to keep the current behaviour of the select all action in the attribute table.
Comparing to a single spreadsheet is not fair, since in QGIS we also have a map that still contains the filtered out features which can also be selected using the map tools or even other attribute tables. I can see that probably the most common and intuitive behavior is to select all filtered rows, however if we decide to switch to that behavior there are other things to consider at the same time:
My answer to all of the above is: I don't think so
Just a small input regarding the user interface: in some software, the user interface shows a button for a command, and just below/next to the button there's a small arrow-button indicating further variants of that command. Upon clicking the arrow, these variants are accessible. I am finding this quite an intuitive way to help users find their way. I imagine there's a select-all button with such an arrow. As a user, if this command is not doing what I'd been expecting (e.g. because excel works differently) the next attempt will be clicking the arrow and there I'd find "select all filtered features" (ideally with its own keyboard-shortcut).
But I'd still expect that not-selected attributes will not create a null-line in the output.
What is the bug or the crash?
In the attribute table, when filtering data and then using select-all to copy-paste values, the excluded data shows up as "Null" values in the data export. A user however expects to have only the shown data in the export.
Steps to reproduce the issue
What should happen: in the spreadsheet/text file there should be the same number of data-rows as displayed in the attribute table (in my case: 10 rows of data)
What happens instead: QGIS exports a null value for each excluded data-row and appends the filtered data-row at the very end. (in my case I get 51850 rows of "Null" values and at the very end 10 rows with the actual filtered data
Versions
QGIS 3.28.14
Supported QGIS version
New profile
Additional context
No response