If you import an OFX or QFX file that contains nothing that isn't already in the GnuCash file (so the list of imported transactions is empty) then the OK button does nothing. It should close the import dialog.
Mike if there are no records to be imported why would you not use the Cancel button? In GnuCash 3.5, the OK clicked routine iterates through the transactions displayed in the treeview and checks the flags in the import info. Unless these are set to ADD, UPDATE or CLEAR ( should be SKIP if not marked for import), then it is a no-op and a call to gnc_gen_trans_list_delete() closes the importer gui. Not sure for earlier versions- which version did this occur with?
I'd think that if there are no transactions to import the right thing to do would be to pop a messagebox saying so instead of an empty match dialog.
I have submitted a PR for this.
PR has been merged into maint. Thanks!
I reproduced this on GnuCash 3.6 on macOS 10.13.6 High Sierra. I find this behaviour annoying also. I am looking forward to having this fixed. (In reply to David Cousens DaveC49 from comment #1) > …if there are no records to be imported why would you not use the Cancel > button? I want to use the "OK" button because it means something different than the "Cancel" button. The "OK" button means, "what this dialogue proposes is fine by me, I want to proceed". The "Cancel" button means, "what this dialogue proposes is not acceptable, I want to back up and do something different". If the OFX file has no transactions, that is fine by me, and I want to proceed. No transactions get imported. Maybe GnuCash makes a hidden notation that it has seen the contents of this OFX file. But to tell the application, "it is not acceptable that this OFX file have no transactions", is the wrong message. The app should not force the user to say that.
Note there are two variations on this scenario: 1. where a user imports the same OFX file for a second time, and 2. where a user imports an OFX file which contains zero transactions. If GnuCash pops up a dialogue "saying so", as John proposes in comment #2, then I suggest it put up different messages for these two variations. This will surprise the user less. I do most of my transaction imports quarterly, or even less often. I'm often overdue and forgetful about my bookkeeping. I will routinely be unsure if I have imported an OFX file already, so will try it again to be sure. It would be nice if GnuCash were to tell me when it recognises an OFX file it has already seen.
With the new behavior, it does tell you that it found N transactions but none are for review (i.e., they were all previously imported)