Update modified items in generic wxDataViewCtrl immediately
Recent optimizations avoiding resort on item change (see https://github.com/wxWidgets/wxWidgets/pull/642) have also optimized away refreshing the modified item, which was done implicitly, as a side effect of resorting, before, so the changes were not reflected on display immediately any longer. Fix this by simply refreshing the item explicitly and also add a way to test for the correct behaviour in the sample.
This commit is contained in:
@@ -2959,6 +2959,9 @@ bool wxDataViewMainWindow::DoItemChanged(const wxDataViewItem & item, int view_c
|
||||
GetOwner()->InvalidateColBestWidth(view_column);
|
||||
}
|
||||
|
||||
// Update the displayed value(s).
|
||||
RefreshRow(GetRowByItem(item));
|
||||
|
||||
// Send event
|
||||
wxDataViewEvent le(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, m_owner, column, item);
|
||||
m_owner->ProcessWindowEvent(le);
|
||||
|
Reference in New Issue
Block a user