mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[aqbanking] Bug 797430: Avoid double init of gui
Patch by Mike Pieper. Thanks!
Explanation for why this is necessary: The previous (old) behaviour
changed in 62f7aa66
. Before this commit (or when AQBANKING6 is not
set) it calls AB_JobSepaTransfer_new. For AQBANKING6 it calls
AB_Transaction_new. AB_Transaction_new is not using gui. Therefore
gui->state stays on INIT, while before it made several status changes
(=> RUNNING, FINISHED, HIDDEN). On second call to gnc_GWEN_Gui_get it
checks the state and finds it still in INIT which seems to be wrong.
So the right fix is to either use gui in AB_Transaction_new or to
remove first allocation, which is done here.
This commit is contained in:
parent
bb4aa19a3d
commit
82e9b14dc5
@ -142,6 +142,7 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc,
|
||||
GNC_AB_JOB_STATUS job_status;
|
||||
GncABImExContextImport *ieci = NULL;
|
||||
|
||||
#ifndef AQBANKING6
|
||||
/* Get a GUI object */
|
||||
gui = gnc_GWEN_Gui_get(parent);
|
||||
if (!gui)
|
||||
@ -150,6 +151,7 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc,
|
||||
aborted = TRUE;
|
||||
goto repeat;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Let the user enter the values */
|
||||
result = gnc_ab_trans_dialog_run_until_ok(td);
|
||||
|
Loading…
Reference in New Issue
Block a user