From 329b59e26303924d95f6f96435c817a9f4c69e1d Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 25 Sep 2014 17:22:11 +0000 Subject: [PATCH] Fix saving edited property value when wxPG property is in 'invalid value' state. When wxPGProperty is loosing focus in 'invalid value' state its pending value should be stored before resetting property to 'normal' state because this operation (wxPG::OnValidationFailureReset) also resets pending value. Closes #16587 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/propgrid.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index de22c22662..0aada2d7d5 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -3327,9 +3327,6 @@ bool wxPropertyGrid::DoPropertyChanged( wxPGProperty* p, unsigned int selFlags ) m_pState->m_anyModified = 1; - // If property's value is being changed, assume it is valid - OnValidationFailureReset(selected); - // Maybe need to update control wxASSERT( m_chgInfo_changedProperty != NULL ); @@ -3337,6 +3334,9 @@ bool wxPropertyGrid::DoPropertyChanged( wxPGProperty* p, unsigned int selFlags ) wxPGProperty* changedProperty = m_chgInfo_changedProperty; wxVariant value = m_chgInfo_pendingValue; + // If property's value is being changed, assume it is valid + OnValidationFailureReset(selected); + wxPGProperty* topPaintedProperty = changedProperty; while ( !topPaintedProperty->IsCategory() &&