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/branches/WX_3_0_BRANCH@76627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -605,6 +605,7 @@ All (GUI):
|
||||
- Fix dragging columns in wxGrid when some of them are hidden (Artur Wieczorek).
|
||||
- Fix selecting elements from wxPropertyGrid enum properties (Artur Wieczorek).
|
||||
- Don't show the dialog twice for colours in wxPropertyGrid (Artur Wieczorek).
|
||||
- Fix handling of custom colours in wxPropertyGrid choices (Artur Wieczorek).
|
||||
|
||||
wxGTK:
|
||||
|
||||
|
@@ -1261,7 +1261,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);
|
||||
|
Reference in New Issue
Block a user