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
This commit is contained in:
@@ -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() &&
|
||||
|
Reference in New Issue
Block a user