Fix selection in generic wxDataViewCtrl after adding an item
Notify m_selection about the new item in all cases, not just when using a virtual list model. This was broken back in36a5983f64
and only fixed for virtual list controls, but not all the other ones, in9f5af0a494
.
This commit is contained in:
committed by
Vadim Zeitlin
parent
dd56499fe9
commit
be12bc6a8a
@@ -2768,8 +2768,6 @@ bool wxDataViewMainWindow::ItemAdded(const wxDataViewItem & parent, const wxData
|
||||
wxDataViewVirtualListModel *list_model =
|
||||
(wxDataViewVirtualListModel*) GetModel();
|
||||
m_count = list_model->GetCount();
|
||||
|
||||
m_selection.OnItemsInserted(GetRowByItem(item), 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2860,6 +2858,8 @@ bool wxDataViewMainWindow::ItemAdded(const wxDataViewItem & parent, const wxData
|
||||
InvalidateCount();
|
||||
}
|
||||
|
||||
m_selection.OnItemsInserted(GetRowByItem(item), 1);
|
||||
|
||||
GetOwner()->InvalidateColBestWidths();
|
||||
UpdateDisplay();
|
||||
|
||||
|
Reference in New Issue
Block a user