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:
parent
31329795c4
commit
858102d740
@ -1242,9 +1242,24 @@ bool wxSystemColourProperty::IntToValue( wxVariant& variant, int number, int WXU
|
||||
}
|
||||
|
||||
// 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) )
|
||||
{
|
||||
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
|
||||
// switched to one that has wxButton as well.
|
||||
|
Loading…
Reference in New Issue
Block a user