mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 18:00:06 +00:00
Fix radar product model display and refresh
This commit is contained in:
parent
f24aa78b50
commit
917926a0ec
2 changed files with 11 additions and 0 deletions
|
|
@ -191,9 +191,19 @@ void TreeModel::AppendRow(TreeItem* parent, TreeItem* child)
|
|||
const int first = childCount;
|
||||
const int last = childCount;
|
||||
|
||||
if (parent == p->rootItem_.get())
|
||||
{
|
||||
beginResetModel();
|
||||
}
|
||||
|
||||
beginInsertRows(parentIndex, first, last);
|
||||
parent->AppendChild(child);
|
||||
endInsertRows();
|
||||
|
||||
if (parent == p->rootItem_.get())
|
||||
{
|
||||
endResetModel();
|
||||
}
|
||||
}
|
||||
|
||||
const TreeItem* TreeModelImpl::item(const QModelIndex& index) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue