Fixed setting validation flags in the editor validation function (wxPropertyGrid::DoEditorValidate).
Currently, validation flags are initialized when post-process validation is invoked (in wxPropertyGrid::PerformValidation) and when first editing operation fails earlier on the pre-process validation (in wxPropertyGrid::DoEditorValidate) then these flags are not initialized and no validation error message is displayed. Hence validation flags should be initialized in both validation functions.
This commit is contained in:
@@ -3528,6 +3528,9 @@ bool wxPropertyGrid::DoEditorValidate()
|
|||||||
if ( guard.IsInside() )
|
if ( guard.IsInside() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
m_validationInfo.m_failureBehavior = m_permanentValidationFailureBehavior;
|
||||||
|
m_validationInfo.m_isFailing = true;
|
||||||
|
|
||||||
wxPGProperty* selected = GetSelection();
|
wxPGProperty* selected = GetSelection();
|
||||||
if ( selected )
|
if ( selected )
|
||||||
{
|
{
|
||||||
@@ -3541,6 +3544,8 @@ bool wxPropertyGrid::DoEditorValidate()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_validationInfo.m_isFailing = false;
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user