Add wxGrid::RefreshAttr() method to force attribute refresh.
A cached attribute may continue to be used even though the attribute returned by a custom wxGridCellAttrProvider has changed so add a method to force wxGrid to update the attribute by forgetting the cached copy. Closes #12406. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -7259,6 +7259,13 @@ void wxGrid::ClearAttrCache()
|
||||
}
|
||||
}
|
||||
|
||||
void wxGrid::RefreshAttr(int row, int col)
|
||||
{
|
||||
if ( m_attrCache.row == row && m_attrCache.col == col )
|
||||
ClearAttrCache();
|
||||
}
|
||||
|
||||
|
||||
void wxGrid::CacheAttr(int row, int col, wxGridCellAttr *attr) const
|
||||
{
|
||||
if ( attr != NULL )
|
||||
|
Reference in New Issue
Block a user