gattrib "add column" menu item moves data incorrectly

Bug #698608 reported by armena
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gEDA
Confirmed
Undecided
Unassigned
geda-gaf (Fedora)
New
Undecided
Unassigned

Bug Description

When using gattrib (obtained earlier today from git://git.gpleda.org/gaf.git) and selecting the "Add new attrib column" entry from the "Edit" menu, a new column is added, as expected. gattrib also helpfully sorts the column headings. However, the data in the table below does not get moved to match the new column headings!

I have been reading through the code but I have not yet figured out the mapping between the table columns and the spreadsheet columns, although it doesn't look as if s_toplevel_add_new_attrib goes out of its way to fix things up after sorting the column headers. Indeed, I've worked around the issue in the interim by commenting out the call to s_string_list_sort_master_comp_attrib_list( ) in s_toplevel_add_new_attrib( ). It doesn't fix the underlying problem, but does allow me to get work done.

For anyone thinking about writing a real patch, I did do a small bit of additional investigation. There was a patch around 2006 which changed s_toplevel_add_new_attrib( ) to resize the table instead of reconstructing it from scratch. git commit 9d0f3a29, I think ("fixed bug in which adding a new attrib column would munge the visibility of existing attributes"). That introduced s_table_resize and possibly this bug. But I could easily be wrong on that.

Changed in geda:
status: New → Confirmed
Revision history for this message
Joe Eli Mcilvain (jemc) wrote :

This bug seems to be a duplicate of this bug: https://bugs.launchpad.net/geda/+bug/698575

I've already written a patch that corrects this behavior, but I'm concerned about how gattrib handles "duplicate" attributes (attributes with the same column heading), and I want fix that behavior in the patch too. See my comment on the other bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.