Revert "Fix showing cells without values in wxDataViewCtrl"
This reverts commit f68c88b8d2
which
doesn't seem necessary any longer: the originally observed problem can't
be reproduced in contemporary macOS versions (10.14+), while calling
SetValue() even for null values results in asserts from several
renderers which don't expect this to happen.
This commit is best viewed ignoring whitespace-only changes.
Closes #18934.
This commit is contained in:
@@ -884,21 +884,19 @@ wxDataViewRendererBase::PrepareForItem(const wxDataViewModel *model,
|
||||
wxTRY
|
||||
{
|
||||
|
||||
// Now check if we have a value and remember it for rendering it later.
|
||||
// Notice that we do it even if it's null, as the cell should be empty then
|
||||
// and not show the last used value.
|
||||
// Now check if we have a value and remember it if we do.
|
||||
wxVariant value = CheckedGetValue(model, item, column);
|
||||
|
||||
if ( m_valueAdjuster )
|
||||
{
|
||||
if ( IsHighlighted() )
|
||||
value = m_valueAdjuster->MakeHighlighted(value);
|
||||
}
|
||||
|
||||
SetValue(value);
|
||||
|
||||
if ( !value.IsNull() )
|
||||
{
|
||||
if ( m_valueAdjuster )
|
||||
{
|
||||
if ( IsHighlighted() )
|
||||
value = m_valueAdjuster->MakeHighlighted(value);
|
||||
}
|
||||
|
||||
SetValue(value);
|
||||
|
||||
// Also set up the attributes for this item if it's not empty.
|
||||
wxDataViewItemAttr attr;
|
||||
model->GetAttr(item, column, attr);
|
||||
|
Reference in New Issue
Block a user