mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
need to close windows before destroying groups
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@267 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
c7263cb8a7
commit
f89e022530
@ -54,4 +54,19 @@ xaccAccountWindowDestroy (Account *acc)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------ */
|
||||||
|
|
||||||
|
void
|
||||||
|
xaccGroupWindowDestroy (AccountGroup *grp)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (!grp) return;
|
||||||
|
|
||||||
|
/* recursively destroy windows associated with children */
|
||||||
|
for (i=0; i<grp->numAcc; i++) {
|
||||||
|
xaccAccountWindowDestroy (grp->account[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/************************** END OF FILE *************************/
|
/************************** END OF FILE *************************/
|
||||||
|
@ -895,6 +895,9 @@ fileMenubarCB( Widget mw, XtPointer cd, XtPointer cb )
|
|||||||
newfile = fileBox(toplevel,OPEN, "*.dat");
|
newfile = fileBox(toplevel,OPEN, "*.dat");
|
||||||
if (newfile) {
|
if (newfile) {
|
||||||
datafile = newfile;
|
datafile = newfile;
|
||||||
|
|
||||||
|
/* destroy open windows first, before destroying the group itself */
|
||||||
|
xaccGroupWindowDestroy (grp);
|
||||||
freeAccountGroup (grp);
|
freeAccountGroup (grp);
|
||||||
|
|
||||||
/* load the accounts from the users datafile */
|
/* load the accounts from the users datafile */
|
||||||
|
Loading…
Reference in New Issue
Block a user