mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-06 20:45:54 +01:00
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:
parent
5742c5cb12
commit
e07686491c
1 changed files with 4 additions and 3 deletions
|
@ -359,6 +359,10 @@ saveGame( CommonGlobals* cGlobals )
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( doSave ) {
|
if ( doSave ) {
|
||||||
|
if ( !!cGlobals->pDb ) {
|
||||||
|
summarize( cGlobals );
|
||||||
|
}
|
||||||
|
|
||||||
XWStreamCtxt* outStream;
|
XWStreamCtxt* outStream;
|
||||||
MemStreamCloseCallback onClose = !!cGlobals->pDb?
|
MemStreamCloseCallback onClose = !!cGlobals->pDb?
|
||||||
writeToDB : writeToFile;
|
writeToDB : writeToFile;
|
||||||
|
@ -377,9 +381,6 @@ saveGame( CommonGlobals* cGlobals )
|
||||||
game_saveSucceeded( &cGlobals->game, cGlobals->curSaveToken );
|
game_saveSucceeded( &cGlobals->game, cGlobals->curSaveToken );
|
||||||
XP_LOGF( "%s: saved", __func__ );
|
XP_LOGF( "%s: saved", __func__ );
|
||||||
|
|
||||||
if ( !!cGlobals->pDb ) {
|
|
||||||
summarize( cGlobals );
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
XP_LOGF( "%s: simulating save failure", __func__ );
|
XP_LOGF( "%s: simulating save failure", __func__ );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue