From 95b7a2f1837d677d8ee9c79f78c79cd3bfc5f3fb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 30 Nov 2021 23:03:28 +0000 Subject: [PATCH] Return false from PrepareForItem() if there is no value This corresponds to the behaviour described in the comment and is more useful than always returning true. --- src/common/datavcmn.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index f17b761ffa..cd070d2870 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -913,16 +913,15 @@ wxDataViewRendererBase::PrepareForItem(const wxDataViewModel *model, // empty cells. SetEnabled(model->IsEnabled(item, column)); + return !value.IsNull(); } wxCATCH_ALL ( // There is not much we can do about it here, just log it and don't // show anything in this cell. wxLogDebug("Retrieving the value from the model threw an exception"); - SetValue(wxVariant()); + return false; ) - - return true; }