Invalidate color sample after editing it so it'll get redrawn even if

not obscured by editor window.
This commit is contained in:
ehouse 2010-01-11 03:31:04 +00:00
parent 232551cd14
commit 8d3c951c81

View file

@ -296,7 +296,7 @@ initColorData( ColorsDlgState* cState )
cState->colors[i] = ref;
cState->brushes[i] = CreateSolidBrush( ref );
cState->buttons[i] = button;
EnableWindow( button, FALSE );
EnableWindow( button, FALSE ); /* sample, so disable */
}
} /* initColorData */
@ -336,8 +336,7 @@ wrapChooseColor( ColorsDlgState* cState, XP_U16 button )
cState->colors[index] = clrref;
DeleteObject( cState->brushes[index] );
cState->brushes[index] = CreateSolidBrush( clrref );
XP_LOGF( "%s: may need to invalidate the button since "
"color's changed", __func__ );
InvalidateRect( cState->buttons[index], NULL, TRUE );
}
#else
CHOOSECOLOR ccs;
@ -365,6 +364,7 @@ wrapChooseColor( ColorsDlgState* cState, XP_U16 button )
cState->colors[index] = ccs.rgbResult;
DeleteObject( cState->brushes[index] );
cState->brushes[index] = CreateSolidBrush( ccs.rgbResult );
InvalidateRect( cState->buttons[index], NULL, TRUE );
}
#endif
handled = XP_TRUE;