From 4489ddc13c652339245ff16492335439372c6f9c Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Wed, 2 Oct 2019 00:06:58 +0200 Subject: [PATCH] Update wxPropertyGrid documentation Mention that ChangePropertyValue() shouldn't be called from wxEVT_PG_CHANGED handler. See #18502. --- interface/wx/propgrid/propgrid.h | 5 ++++- interface/wx/propgrid/propgridiface.h | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/interface/wx/propgrid/propgrid.h b/interface/wx/propgrid/propgrid.h index 87d3af9194..3b9aefa2d9 100644 --- a/interface/wx/propgrid/propgrid.h +++ b/interface/wx/propgrid/propgrid.h @@ -570,7 +570,10 @@ public: /** Changes value of a property, as if from an editor. Use this instead of SetPropertyValue() if you need the value to run through validation - process, and also send the property change event. + process, and also send @c wxEVT_PG_CHANGED. + + @remarks Since this function sends @c wxEVT_PG_CHANGED, it should not + be called from @c EVT_PG_CHANGED handler. @return Returns @true if value was successfully changed. */ diff --git a/interface/wx/propgrid/propgridiface.h b/interface/wx/propgrid/propgridiface.h index cd4c97c6ec..5e1fdc8ceb 100644 --- a/interface/wx/propgrid/propgridiface.h +++ b/interface/wx/propgrid/propgridiface.h @@ -225,7 +225,10 @@ public: /** Changes value of a property, as if by user. Use this instead of SetPropertyValue() if you need the value to run through validation - process, and also send the property change event. + process, and also send @c wxEVT_PG_CHANGED. + + @remarks Since this function sends @c wxEVT_PG_CHANGED, it should not + be called from @c EVT_PG_CHANGED handler. @return Returns @true if value was successfully changed. */ @@ -1157,8 +1160,8 @@ public: /** Sets value (wxVariant) of a property. - @remarks Use wxPropertyGrid::ChangePropertyValue() instead if you need to - run through validation process and send property change event. + @remarks Use ChangePropertyValue() instead if you need to + run through validation process and send property change event. */ void SetPropertyValue( wxPGPropArg id, wxVariant value );