[wxPropertyGrid] Issue when deleting a property "solved

Are you writing your own components and need help with how to set them up or have questions about the components you are deriving from ? Ask them here.
Post Reply
Earned a small fee
Earned a small fee
Posts: 15
Joined: Tue Dec 23, 2008 5:42 pm

[wxPropertyGrid] Issue when deleting a property "solved

Post by Progger » Sat May 23, 2009 2:27 pm

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.

Post Reply