X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/72e8179f260d9c1b1162a62c551aea79bb79f6c2..a5655d37db9baabce654849fd66173f95f74e230:/src/propgrid/propgrid.cpp diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 5b65f982c6..5d3fc06925 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -6,7 +6,7 @@ // Created: 2004-09-25 // RCS-ID: $Id$ // Copyright: (c) Jaakko Salli -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx/wx.h". @@ -5844,6 +5844,13 @@ bool wxPropertyGrid::IsEditorFocused() const // Called by focus event handlers. newFocused is the window that becomes focused. void wxPropertyGrid::HandleFocusChange( wxWindow* newFocused ) { + // + // Never allow focus to be changed when handling editor event. + // Especially because they may be displaing a dialog which + // could cause all kinds of weird (native) focus changes. + if ( HasInternalFlag(wxPG_FL_IN_HANDLECUSTOMEDITOREVENT) ) + return; + unsigned int oldFlags = m_iFlags; bool wasEditorFocused = false; wxWindow* wndEditor = m_wndEditor;