X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/88f47aa77007c55ec0a8f1a48e429cb0ad050fe5..a5bb451448bc5abdadd4ded3f3bc18dbbf07fedd:/src/propgrid/propgrid.cpp diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 1b01f72f5e..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". @@ -63,6 +63,7 @@ #include "wx/timer.h" #include "wx/dcbuffer.h" +#include "wx/scopeguard.h" // Two pics for the expand / collapse buttons. // Files are not supplied with this project (since it is @@ -5843,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;