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

Method onSceneChanged

bt_editor/mainwindow.cpp:529–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527}
528
529void MainWindow::onSceneChanged()
530{
531 const bool valid_BT = currentTabInfo()->containsValidTree();
532
533 ui->toolButtonLayout->setEnabled(valid_BT);
534 ui->toolButtonReorder->setEnabled(valid_BT);
535 ui->toolButtonReorder->setEnabled(valid_BT);
536
537 ui->actionSave->setEnabled(valid_BT);
538 QPixmap pix;
539
540 if(valid_BT)
541 {
542 pix.load(":/icons/green-circle.png");
543 ui->labelSemaphore->setToolTip("Valid Tree");
544 }
545 else{
546 pix.load(":/icons/red-circle.png");
547 ui->labelSemaphore->setToolTip("NOT a valid Tree");
548 }
549 ui->labelSemaphore->setPixmap(pix);
550 ui->labelSemaphore->setScaledContents(true);
551
552 lockEditing( _current_mode != GraphicMode::EDITOR );
553}
554
555
556GraphicContainer* MainWindow::currentTabInfo()

Callers

nothing calls this directly

Calls 1

containsValidTreeMethod · 0.80

Tested by

no test coverage detected