{
friend class wxPropertyGrid;
public:
+ wxPGValidationInfo()
+ {
+ m_failureBehavior = 0;
+ m_isFailing = false;
+ }
+
+ ~wxPGValidationInfo()
+ {
+ }
+
/**
@return Returns failure behavior which is a combination of
@ref propgrid_vfbflags.
/** Validation failure behavior. Use wxPG_VFB_XXX flags.
*/
wxPGVFBFlags m_failureBehavior;
+
+ // True when validation is currently failing.
+ bool m_isFailing;
};
// -----------------------------------------------------------------------
//
m_validationInfo.m_failureBehavior = m_permanentValidationFailureBehavior;
+ m_validationInfo.m_isFailing = true;
//
// Variant list a special value that cannot be validated
pendingValue = value;
}
+ m_validationInfo.m_isFailing = false;
+
return true;
}
DrawItemAndChildren(property);
}
}
+
+ m_validationInfo.m_isFailing = false;
}
// -----------------------------------------------------------------------
m_inDoPropertyChanged = 1;
+ // If property's value is being changed, assume it is valid
+ OnValidationFailureReset(selected);
+
// Maybe need to update control
wxASSERT( m_chgInfo_changedProperty != NULL );
selected,
wnd ) )
valueIsPending = true;
+
+ // Mark value always as pending if validation is currently
+ // failing and value was not unspecified
+ if ( !valueIsPending &&
+ !pendingValue.IsNull() &&
+ m_validationInfo.m_isFailing )
+ valueIsPending = true;
}
else
{