-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Selecting/Deleting in attribute table does not work correctly for layers with no attributes (crashes in one situation!) #14537
Comments
Author Name: Alister Hood (@AlisterH) Sorry, the automatic numbering didn't work as I expected:
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Jürgen Fischer (@jef-n)
|
Author Name: Giovanni Manghi (@gioman) Hi Alister, I made a test following the steps you describe and the memory layer plugin, and on both Windows and Linux (gnome) I found differences and I wasn't able to replicate all your steps. Please have a look here and let me know if/what I have done wrong. steps 1-4: the table of attributes shows just the first "pseudo" column with the row id and nothing more. From the canvas with the editing tools is possible to add/remove features and this will reflect correctly in the (empty) table of attributes. step 5: right, selecting a feature in the canvas does not selects anything in the table of attributes. Question: what should be selected in the table of attributes? is empty. I don't see anything strange here. steps 6-8: in my tests clicking on a row id does NOT select anything, in fact if I first click on "deselect features from all layers" and then try to select a feature using the row id in the table of attributes and subsequently clicking on "delete selected features" I always get a "Delete 0 feature(s)?" that as expected does nothing. On the other hand "delete selected features" works as expected after selecting features from the canvas. steps 9-11: cannot replicate this behavior because as I said I'm not able to select anything from the table of attributes, as expected I would say. steps 12-14: same as 9-11 I'm not sure I have done the test correctly, probably I have not understand well your description. Eventually can you make a screencast?
|
Author Name: Alister Hood (@AlisterH) OK, here is a screencast. The behaviour does depend on what order you do things in (I can get the same result as you if I do things differently), and it seems like some aspects of this have changed slightly in current trunk. But the essence is the same:
Note that this computer is quad core, hence the 25% CPU use by QGIS when it freezes. |
Author Name: Alister Hood (@AlisterH) Giovanni Manghi wrote:
The table doesn't have any cells to show as selected, but the row-header (or whatever it is called) should show as selected. It should look like the attached image.
|
Author Name: Jürgen Fischer (@jef-n) Fixed in changeset "d43c89ae6a1cbdc9d957ea5663579ad13950e3b2".
|
Author Name: Alister Hood (@AlisterH) Great, I think that fixed another much more common (but not dangerous) bug, too. Thanks. I think there could be two minor improvements:
|
Author Name: Jürgen Fischer (@jef-n) Alister Hood wrote:
No problem.
That's something OGR does internally as it doesn't fully support shapefiles without DBF (see http://www.gdal.org/ogr/drv_shapefile.html). OGR only support those readonly.
IMHO layers without any attributes are already an edge case and using the attributetable on attributeless layers even tops that ;) |
Author Name: Alister Hood (@AlisterH) Jürgen Fischer wrote:
Oh, I see. I was wondering why I could edit features in shape files with no attributes, but not add attributes, or add or delete features :)
Fair enough. |
Author Name: Alister Hood (@AlisterH)
Original Redmine Issue: 4636
Affected QGIS version: master
Redmine category:digitising
Create a vector layer with no attribute columns. (This is possible with the "new memory layer" plugin - I'm not sure what other formats support layers with no attributes. I guess you could do it with csv + csvt).
The text was updated successfully, but these errors were encountered: