Fix checking if bit in wxPGVFBFlags is set
After implementing wxPGVFBFlags bitmask as enum class in
f1273ce152 ("Use class enums to implement bitmask types", 2023-02-19)
we need to use double negation to check if some bit if set.
Closes #23324.
This commit is contained in:
parent
5f486a0806
commit
38b2bc455c
1 changed files with 5 additions and 5 deletions
|
|
@ -3189,9 +3189,9 @@ bool wxPropertyGrid::OnValidationFailure( wxPGProperty* property,
|
|||
if ( property->HasFlag(wxPG_PROP_INVALID_VALUE) )
|
||||
{
|
||||
m_validationInfo.SetFailureBehavior(
|
||||
vfb & ~(wxPGVFBFlags::ShowMessage |
|
||||
vfb & (~(wxPGVFBFlags::ShowMessage |
|
||||
wxPGVFBFlags::ShowMessageBox |
|
||||
wxPGVFBFlags::ShowMessageOnStatusBar));
|
||||
wxPGVFBFlags::ShowMessageOnStatusBar)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3303,7 +3303,7 @@ void wxPropertyGrid::DoOnValidationFailureReset( wxPGProperty* property )
|
|||
{
|
||||
wxPGVFBFlags vfb = m_validationInfo.GetFailureBehavior();
|
||||
|
||||
if ( !(vfb & wxPGVFBFlags::MarkCell) )
|
||||
if ( !!(vfb & wxPGVFBFlags::MarkCell) )
|
||||
{
|
||||
// Revert cells
|
||||
property->m_cells = m_propCellsBackup;
|
||||
|
|
@ -3322,7 +3322,7 @@ void wxPropertyGrid::DoOnValidationFailureReset( wxPGProperty* property )
|
|||
}
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
if ( !(vfb & wxPGVFBFlags::ShowMessageOnStatusBar) )
|
||||
if ( !!(vfb & wxPGVFBFlags::ShowMessageOnStatusBar) )
|
||||
{
|
||||
if ( !wxPGGlobalVars->m_offline )
|
||||
{
|
||||
|
|
@ -3333,7 +3333,7 @@ void wxPropertyGrid::DoOnValidationFailureReset( wxPGProperty* property )
|
|||
}
|
||||
#endif
|
||||
|
||||
if ( !(vfb & wxPGVFBFlags::ShowMessage) )
|
||||
if ( !!(vfb & wxPGVFBFlags::ShowMessage) )
|
||||
{
|
||||
DoHidePropertyError(property);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue