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:
Artur Wieczorek
2015-05-26 21:09:30 +02:00
parent 5251766edc
commit 7e14b6e61f

View File

@@ -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;
} }