mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +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 */
|
} /* ceChooseAndOpen */
|
||||||
|
|
||||||
|
static void
|
||||||
|
updateForColors( CEAppGlobals* globals )
|
||||||
|
{
|
||||||
|
ce_drawctxt_update( globals->draw, globals );
|
||||||
|
if ( !!globals->game.board ) {
|
||||||
|
board_invalAll( globals->game.board );
|
||||||
|
}
|
||||||
|
} /* updateForColors */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ceDoPrefsDlg( CEAppGlobals* globals )
|
ceDoPrefsDlg( CEAppGlobals* globals )
|
||||||
{
|
{
|
||||||
PrefsDlgState state;
|
CePrefsDlgState state;
|
||||||
PrefsPrefs prefsPrefs;
|
CePrefsPrefs prefsPrefs;
|
||||||
|
|
||||||
XP_MEMSET( &state, 0, sizeof(state) );
|
XP_MEMSET( &state, 0, sizeof(state) );
|
||||||
|
|
||||||
|
@ -983,6 +992,9 @@ ceDoPrefsDlg( CEAppGlobals* globals )
|
||||||
|
|
||||||
(void)cePositionBoard( globals );
|
(void)cePositionBoard( globals );
|
||||||
|
|
||||||
|
if ( state.colorsChanged ) {
|
||||||
|
updateForColors( globals );
|
||||||
|
}
|
||||||
/* need to reflect vars set in state into globals, and update/inval
|
/* need to reflect vars set in state into globals, and update/inval
|
||||||
as appropriate. */
|
as appropriate. */
|
||||||
}
|
}
|
||||||
|
@ -1217,8 +1229,11 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
if ( !state.userCancelled && state.prefsChanged ) {
|
if ( !state.userCancelled && state.prefsChanged ) {
|
||||||
/* need to update some prefs? */
|
/* need to update some prefs? */
|
||||||
|
/* if ( state.colorsChanged ) { */
|
||||||
|
updateForColors( globals );
|
||||||
|
/* } */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_FILE_NEWGAME:
|
case ID_FILE_NEWGAME:
|
||||||
|
@ -1238,19 +1253,6 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
ceDoPrefsDlg( globals );
|
ceDoPrefsDlg( globals );
|
||||||
break;
|
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:
|
case ID_GAME_FINALSCORES:
|
||||||
if ( server_getGameIsOver( globals->game.server ) ) {
|
if ( server_getGameIsOver( globals->game.server ) ) {
|
||||||
ceDisplayFinalScores( globals );
|
ceDisplayFinalScores( globals );
|
||||||
|
|
Loading…
Reference in a new issue