From 89d16faf307fcbfe67d0e4fbd789b66162e73be3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 29 May 2014 23:48:51 +0000 Subject: [PATCH] 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 --- src/propgrid/advprops.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index e7d4d8e083..9cabc83788 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -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);