MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / clearTreeModels

Method clearTreeModels

bt_editor/mainwindow.cpp:1465–1483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1463
1464
1465void MainWindow::clearTreeModels()
1466{
1467 _treenode_models = BuiltinNodeModels();
1468
1469 std::list<QString> ID_to_delete;
1470 for(const auto& it: _model_registry->registeredModelCreators() )
1471 {
1472 const auto& ID = it.first;
1473 if( _treenode_models.count( ID ) == 0)
1474 {
1475 ID_to_delete.push_back(ID);
1476 }
1477 }
1478 for(const auto& ID: ID_to_delete )
1479 {
1480 _model_registry->unregisterModel(ID);
1481 }
1482 _editor_widget->updateTreeView();
1483}
1484
1485const NodeModels &MainWindow::registeredModels() const
1486{

Callers

nothing calls this directly

Calls 1

updateTreeViewMethod · 0.80

Tested by

no test coverage detected