Page 1 of 1

[wxPropertyGrid] Issue when deleting a property "solved

Posted: Sat May 23, 2009 2:27 pm
by Progger
Hi there is a bug when deleting a property creating it again and then right clicking.
Debugging for some time I found the failure. The member of wxPropertyGrid m_propHover is not reseted when deleting so the application crashes when it comes to right clicking.
I could solve it in this way:

1. propgrid.cpp, function "void wxPropertyGridInterface::DeleteProperty( wxPGPropArg id )", line 4023
added the following code line at the end of this function: grid->ResetPropHover();

2. propgrid.h
defined the function ResetPropHover for wxPropertyGrid:
void ResetPropHover() { m_propHover = NULL; }

I hope it helps.