GnuCash
Contact   Instructions
Bug 797397 - Import Map editor - Deletion not limited by current filter
Summary: Import Map editor - Deletion not limited by current filter
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Import - Other (show other bugs)
Version: 3.6
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: import
QA Contact: import
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-09 16:48 EDT by David Cousens DaveC49
Modified: 2020-05-27 05:01 EDT (History)
4 users (show)

See Also:


Attachments

Description David Cousens DaveC49 2019-09-09 16:48:06 EDT
When using the map editor if you use the filter capability to locate and display  all entries with a given string e.g "MapAccount NOT found", select all displayed entries with Ctrl-A and then use the Delete button, all of the data is deleted not just the data that has been displayed by the filter. This implies that the Ctrl-A action is selecting all records in the treeview and not just those matching the filter.
Comment 1 Bob 2019-09-23 09:16:33 EDT
That's an interesting observation, nor sure I had tested that. The problem is if you do a filter, all the parent rows are shown with empty rows so a Ctrl-A selects all rows and when you use the delete button.

So what to do...
A possible solution is to hide the parent row if doing a filter so it can not be selected. Will have a look.
Comment 2 Bob 2019-09-23 11:50:48 EDT
OK I have a fix for this locally, what it does is if there is some filter text, the parent rows can not be selected, if no text then they can be selected so you can delete all entries for source account, I have used a select function similar to what you used for imports.

A quick question, if you have entered a filter, pressed the 'Filter' button, what should have the keyboard focus, the tree view, filter text or leave as is on the button?
Comment 3 Bob 2019-09-27 06:36:32 EDT
I have pushed my fix to maint so will be fixed in the next release. If you can check and report back that would be great.
Comment 4 David Cousens DaveC49 2019-10-26 23:18:39 EDT
I would have thought either leaving the focus on the filter button or shifting it back to the treeview would be appropriate. the focus will shift once you select something in the treview in any case.

I haven't been working on the code much lately - got committed to updating the import documentation. I'll drag myself away and build maint and see how it looks.
Comment 5 Chris Good 2020-05-27 02:55:03 EDT
Hi David,
Had a chance to test this yet?
You might like to test the latest master version as that has changed considerably.
Comment 6 David Cousens DaveC49 2020-05-27 05:01:02 EDT
Hi Chris
That works fine now and only deletes the selected rows.

Thanks

David

Note You need to log in before you can comment on or make changes to this bug.