Fix deleting editor controls associated with wxPG properties from within event handler.

Editor controls (and their event handlers) deleted from within wxPG event handler shouldn't by deleted in global idle event handler but only in local wxPG event handler because global idle events can be generated also by calling e.g. wxYield when wxPG is not in the real idle state.

Closes #16617

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Artur Wieczorek
2014-10-16 22:49:01 +00:00
parent 633b49ef6e
commit c234f5078f
3 changed files with 43 additions and 0 deletions

View File

@@ -1896,6 +1896,11 @@ protected:
wxArrayPGProperty m_deletedProperties;
wxArrayPGProperty m_removedProperties;
#if !WXWIN_COMPATIBILITY_3_0
/** List of editors and their event handlers to be deleted in idle event handler. */
wxArrayPGObject m_deletedEditorObjects;
#endif
/** List of key codes that will not be handed over to editor controls. */
// FIXME: Make this a hash set once there is template-based wxHashSet.
wxVector<int> m_dedicatedKeys;
@@ -2228,6 +2233,8 @@ protected:
bool DoHideProperty( wxPGProperty* p, bool hide, int flags );
void DeletePendingObjects();
private:
bool ButtonTriggerKeyTest( int action, wxKeyEvent& event );