GnuCash
Contact   Instructions
Bug 779565 - Treeview header combos do not work at first load.
Summary: Treeview header combos do not work at first load.
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Import - CSV (show other bugs)
Version: git-master
Hardware: Other Linux
: Normal normal
Target Milestone: ---
Assignee: import
QA Contact: import
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 778981
  Show dependency tree
 
Reported: 2017-03-04 06:04 EST by Bob
Modified: 2019-03-21 07:05 EDT (History)
3 users (show)

See Also:


Attachments

Description Bob 2017-03-04 06:04:58 EST
If you have a comma separated file and load it, the column header combo boxes do not work, unable to change. If you select an additional separator or other option, like say the semicolon, they start to work.

I have looked at preview_cbox_factory to check the model has the right number of options and it does, monitored the call back and it does not fire, just can not see what is wrong.
Comment 1 Bob 2017-03-04 06:18:51 EST
After further looking I can make it work by changing line 1605 in assistant-csv-trans-import.cpp from this...

preview_refresh_table ();
to
g_idle_add ((GSourceFunc)csv_imp_preview_queue_rebuild_table, this);

I also think that the preview_refresh() in the file_confirm_cb may not be required as there is one in preview_settings_load which executes any way and you can no go back to the file page anyway. 

There is another preview_refresh_table in the 'preview_update_encoding' and 'assist_preview_page_prepare' that also execute at first load pass, just wondering if there should be a mechanism to stop all this execution of the same code ?


Bob
Comment 2 Bob 2018-10-24 10:59:10 EDT
I added the above to PR424 as a possible fix.
Comment 3 Geert Janssens 2019-03-21 07:05:42 EDT
Bob's fix has been included in gnucash 3.4. Closing the report. Thanks for bringing it up and thanks for the fix!

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