Property removal and deletion done from wxPropertyGrid event handler is now postponed to idle event

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2010-02-22 16:44:56 +00:00
parent e908dbcc92
commit f231df8aa8
5 changed files with 77 additions and 12 deletions

View File

@@ -1808,6 +1808,10 @@ protected:
/** Appearance of a unspecified value cell. */
wxPGCell m_unspecifiedAppearance;
/** List of properties to be deleted/removed in idle event handler. */
wxArrayPGProperty m_deletedProperties;
wxArrayPGProperty m_removedProperties;
//
// Temporary values
//

View File

@@ -240,18 +240,34 @@ public:
bool ChangePropertyValue( wxPGPropArg id, wxVariant newValue );
/**
Deletes a property by id. If category is deleted, all children are
automatically deleted as well.
*/
Removes and deletes a property and any children.
@param id
Pointer or name of a property.
@remarks If you delete a property in a wxPropertyGrid event
handler, the actual deletion is postponed until the next
idle event.
This functions deselects selected property, if any.
Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not
respected, ie. selection is cleared even if editor had
invalid value.
*/
void DeleteProperty( wxPGPropArg id );
/**
Removes and returns a property.
Removes a property. Does not delete the property object, but
instead returns it.
@param id
Pointer or name of a property.
@remarks Removed property cannot have any children.
Also, if you remove property in a wxPropertyGrid event
handler, the actual removal is postponed until the next
idle event.
*/
wxPGProperty* RemoveProperty( wxPGPropArg id );