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:
@@ -1267,7 +1267,7 @@ bool wxSystemColourProperty::IntToValue( wxVariant& variant, int number, int arg
|
|||||||
int index = number;
|
int index = number;
|
||||||
int type = m_choices.GetValue(index);
|
int type = m_choices.GetValue(index);
|
||||||
|
|
||||||
if ( type == wxPG_COLOUR_CUSTOM )
|
if ( m_choices.GetLabel(index) == _("Custom") )
|
||||||
{
|
{
|
||||||
if ( !(argFlags & wxPG_PROPERTY_SPECIFIC) )
|
if ( !(argFlags & wxPG_PROPERTY_SPECIFIC) )
|
||||||
return QueryColourFromUser(variant);
|
return QueryColourFromUser(variant);
|
||||||
|
Reference in New Issue
Block a user