Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 777949 - Accounts implicitly created in ledger attempt creation t…
…wice Guard against recursively calling the account doesn’t exist query or creation dialog if one is already in the account creation dialog. The underlying problem is that creating the dialog forces a UI update that in turn sets the cell value and checks for the existence of the account. In basic view the cell being displayed (“transfer”) isn’t the one being changed (“account”) so the account check isn’t invoked, but in multi-split view the “account” cell *is* displayed so the check is invoked again.
- Loading branch information
bc50f3d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think gnucash only uses one thread at a time, right? Since this is GUI code, I think that's not likely to change, so this being not thread-safe should be okay. Is there any notation we should add to this effect?
I'm happy to see this fixed, and happy to see it's such a straightforward fix.
bc50f3d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The register is certainly single-threaded now. This is really "controller" (in the MVC sense) so its theoretically possible to call it from somewhere besides the GUI thread, but the risk is very low.