Do not process editor control events when propgrid event is currently being processed. Doing otherwise could lead to a crash if application is doing something time-consuming (such as displaying a message box) in the event handler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-09-27 14:39:03 +00:00
parent 644b283d6a
commit cd4b15e523

View File

@@ -3334,7 +3334,12 @@ void wxPropertyGrid::HandleCustomEditorEvent( wxEvent &event )
// Somehow, event is handled after property has been deselected.
// Possibly, but very rare.
if ( !selected || selected->HasFlag(wxPG_PROP_BEING_DELETED) )
if ( !selected ||
selected->HasFlag(wxPG_PROP_BEING_DELETED) ||
// Also don't handle editor event if wxEVT_PG_CHANGED or
// similar is currently doing something (showing a
// message box, for instance).
m_processedEvent )
return;
if ( m_iFlags & wxPG_FL_IN_HANDLECUSTOMEDITOREVENT )