Fix drawing invalid wxPGProperty

Invalid wxPGProperty needs to be redrawn after setting wxPG_FL_CELL_OVERRIDES_SEL because this flag
is used to select proper colors to mark property as invalid.
This order of operations is important under e.g. wxMSW when redrawing with DrawItemAndChildren() is done immediately.

Closes #18351.
This commit is contained in:
Artur Wieczorek
2019-03-09 14:17:07 +01:00
parent 5a78b82673
commit 47bba8764a

View File

@@ -3271,8 +3271,6 @@ bool wxPropertyGrid::DoOnValidationFailure( wxPGProperty* property, wxVariant& W
cell.SetBgCol(vfbBg);
}
DrawItemAndChildren(property);
if ( property == GetSelection() )
{
SetInternalFlag(wxPG_FL_CELL_OVERRIDES_SEL);
@@ -3284,6 +3282,8 @@ bool wxPropertyGrid::DoOnValidationFailure( wxPGProperty* property, wxVariant& W
editor->SetBackgroundColour(vfbBg);
}
}
DrawItemAndChildren(property);
}
if ( vfb & (wxPG_VFB_SHOW_MESSAGE |