mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
inval board after color changes inside dialogs
This commit is contained in:
parent
a1323b333d
commit
3f54d5394a
1 changed files with 18 additions and 16 deletions
|
@ -962,11 +962,20 @@ ceChooseAndOpen( CEAppGlobals* globals )
|
|||
}
|
||||
} /* ceChooseAndOpen */
|
||||
|
||||
static void
|
||||
updateForColors( CEAppGlobals* globals )
|
||||
{
|
||||
ce_drawctxt_update( globals->draw, globals );
|
||||
if ( !!globals->game.board ) {
|
||||
board_invalAll( globals->game.board );
|
||||
}
|
||||
} /* updateForColors */
|
||||
|
||||
static void
|
||||
ceDoPrefsDlg( CEAppGlobals* globals )
|
||||
{
|
||||
PrefsDlgState state;
|
||||
PrefsPrefs prefsPrefs;
|
||||
CePrefsDlgState state;
|
||||
CePrefsPrefs prefsPrefs;
|
||||
|
||||
XP_MEMSET( &state, 0, sizeof(state) );
|
||||
|
||||
|
@ -983,6 +992,9 @@ ceDoPrefsDlg( CEAppGlobals* globals )
|
|||
|
||||
(void)cePositionBoard( globals );
|
||||
|
||||
if ( state.colorsChanged ) {
|
||||
updateForColors( globals );
|
||||
}
|
||||
/* need to reflect vars set in state into globals, and update/inval
|
||||
as appropriate. */
|
||||
}
|
||||
|
@ -1217,8 +1229,11 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
if ( !state.userCancelled && state.prefsChanged ) {
|
||||
/* need to update some prefs? */
|
||||
/* if ( state.colorsChanged ) { */
|
||||
updateForColors( globals );
|
||||
/* } */
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_FILE_NEWGAME:
|
||||
|
@ -1238,19 +1253,6 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
ceDoPrefsDlg( globals );
|
||||
break;
|
||||
|
||||
#ifdef XWFEATURE_CE_EDITCOLORS
|
||||
case ID_FILE_EDITCOLORS:
|
||||
if ( ceDoColorsEdit( hWnd, globals ) ) {
|
||||
ce_drawctxt_update( globals->draw, globals );
|
||||
if ( !!globals->game.board ) {
|
||||
board_invalAll( globals->game.board );
|
||||
draw = XP_TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
||||
case ID_GAME_FINALSCORES:
|
||||
if ( server_getGameIsOver( globals->game.server ) ) {
|
||||
ceDisplayFinalScores( globals );
|
||||
|
|
Loading…
Reference in a new issue