gtk: summarize before saving

Fixes problem with list view always being a move behind, since it's
saving not summarizing that was triggering the refresh, but summarizing
that added the data from which refresh/list view drew.
This commit is contained in:
Eric House 2016-09-20 08:27:17 -07:00
parent 5742c5cb12
commit e07686491c

View file

@ -359,6 +359,10 @@ saveGame( CommonGlobals* cGlobals )
}
if ( doSave ) {
if ( !!cGlobals->pDb ) {
summarize( cGlobals );
}
XWStreamCtxt* outStream;
MemStreamCloseCallback onClose = !!cGlobals->pDb?
writeToDB : writeToFile;
@ -377,9 +381,6 @@ saveGame( CommonGlobals* cGlobals )
game_saveSucceeded( &cGlobals->game, cGlobals->curSaveToken );
XP_LOGF( "%s: saved", __func__ );
if ( !!cGlobals->pDb ) {
summarize( cGlobals );
}
} else {
XP_LOGF( "%s: simulating save failure", __func__ );
}