mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 18:20:04 +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
|
|
@ -148,6 +148,7 @@ MainWindow::MainWindow(QWidget* parent) :
|
|||
ui->resourceExplorerDock->setVisible(false);
|
||||
|
||||
p->radarProductModel_ = std::make_shared<model::RadarProductModel>();
|
||||
ui->resourceTreeView->setModel(p->radarProductModel_->model());
|
||||
|
||||
// Configure Map
|
||||
p->ConfigureMapLayout();
|
||||
|
|
|
|||
|
|
@ -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