In wxPropertyGrid::HandleCustomEditorEvent(), also filter out excess wxEVT_COMMAND_TEXT_UPDATED events that originated from wxComboCtrl-derived editors.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3377,17 +3377,26 @@ void wxPropertyGrid::HandleCustomEditorEvent( wxEvent &event )
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Filter out excess wxTextCtrl modified events
|
// Filter out excess wxTextCtrl modified events
|
||||||
if ( event.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED &&
|
if ( event.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED && wnd )
|
||||||
wnd &&
|
|
||||||
wnd->IsKindOf(CLASSINFO(wxTextCtrl)) )
|
|
||||||
{
|
{
|
||||||
wxTextCtrl* tc = (wxTextCtrl*) wnd;
|
if ( wnd->IsKindOf(CLASSINFO(wxTextCtrl)) )
|
||||||
|
{
|
||||||
|
wxTextCtrl* tc = (wxTextCtrl*) wnd;
|
||||||
|
|
||||||
wxString newTcValue = tc->GetValue();
|
wxString newTcValue = tc->GetValue();
|
||||||
if ( m_prevTcValue == newTcValue )
|
if ( m_prevTcValue == newTcValue )
|
||||||
return;
|
return;
|
||||||
|
m_prevTcValue = newTcValue;
|
||||||
|
}
|
||||||
|
else if ( wnd->IsKindOf(CLASSINFO(wxComboCtrl)) )
|
||||||
|
{
|
||||||
|
wxComboCtrl* cc = (wxComboCtrl*) wnd;
|
||||||
|
|
||||||
m_prevTcValue = newTcValue;
|
wxString newTcValue = cc->GetTextCtrl()->GetValue();
|
||||||
|
if ( m_prevTcValue == newTcValue )
|
||||||
|
return;
|
||||||
|
m_prevTcValue = newTcValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetInternalFlag(wxPG_FL_IN_HANDLECUSTOMEDITOREVENT);
|
SetInternalFlag(wxPG_FL_IN_HANDLECUSTOMEDITOREVENT);
|
||||||
|
Reference in New Issue
Block a user