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

Method onRequestSubTreeExpand

bt_editor/mainwindow.cpp:740–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

738}
739
740void MainWindow::onRequestSubTreeExpand(GraphicContainer& container,
741 QtNodes::Node& node)
742{
743 auto subtree = dynamic_cast< SubtreeNodeModel*>( node.nodeDataModel() );
744
745 if( !subtree )
746 {
747 throw std::logic_error("passing to onRequestSubTreeExpand something that is not a SubTree");
748 }
749
750 if( subtree->expanded() )
751 {
752 subTreeExpand( container, node, SUBTREE_COLLAPSE );
753 }
754 else
755 {
756 subTreeExpand( container, node, SUBTREE_EXPAND );
757 }
758}
759
760
761void MainWindow::onAddToModelRegistry(const NodeModel &model)

Callers

nothing calls this directly

Calls 1

expandedMethod · 0.80

Tested by

no test coverage detected