Fix cancelling choice of custom colour in wxPropertyGrid.

When using wxPGEditor_Choice colour property, cancelling the choice of the
custom colour reset the previously selected custom colour.

Fix this by correcting the test for the custom colour which didn't work
before.

Closes #15542.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-05-29 23:48:51 +00:00
parent c7fd48db6b
commit 89d16faf30

View File

@ -1267,7 +1267,7 @@ bool wxSystemColourProperty::IntToValue( wxVariant& variant, int number, int arg
int index = number;
int type = m_choices.GetValue(index);
if ( type == wxPG_COLOUR_CUSTOM )
if ( m_choices.GetLabel(index) == _("Custom") )
{
if ( !(argFlags & wxPG_PROPERTY_SPECIFIC) )
return QueryColourFromUser(variant);