Fixed 'Custom' entry in the colour property combo boxes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1242,9 +1242,24 @@ bool wxSystemColourProperty::IntToValue( wxVariant& variant, int number, int WXU
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Need to do some extra event handling.
|
// Need to do some extra event handling.
|
||||||
bool wxSystemColourProperty::OnEvent( wxPropertyGrid* propgrid, wxWindow* WXUNUSED(primary), wxEvent& event )
|
bool wxSystemColourProperty::OnEvent( wxPropertyGrid* propgrid,
|
||||||
|
wxWindow* WXUNUSED(primary),
|
||||||
|
wxEvent& event )
|
||||||
{
|
{
|
||||||
|
bool askColour = false;
|
||||||
|
|
||||||
if ( propgrid->IsMainButtonEvent(event) )
|
if ( propgrid->IsMainButtonEvent(event) )
|
||||||
|
{
|
||||||
|
askColour = true;
|
||||||
|
}
|
||||||
|
else if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED )
|
||||||
|
{
|
||||||
|
if ( GetIndex() == GetCustomColourIndex() &&
|
||||||
|
!(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
|
||||||
|
askColour = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( askColour )
|
||||||
{
|
{
|
||||||
// We need to handle button click in case editor has been
|
// We need to handle button click in case editor has been
|
||||||
// switched to one that has wxButton as well.
|
// switched to one that has wxButton as well.
|
||||||
|
Reference in New Issue
Block a user