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:
@@ -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 |
|
||||
|
Reference in New Issue
Block a user