| 925 | } |
| 926 | |
| 927 | void Scene3DConfigPanel::onLayerAdded(ObjectTopicId topic_id) { |
| 928 | if (bound_dock_ == nullptr) { |
| 929 | return; |
| 930 | } |
| 931 | ISceneLayer* layer = bound_dock_->layerFor(topic_id); |
| 932 | if (layer == nullptr) { |
| 933 | return; |
| 934 | } |
| 935 | const SceneLayerInfo info = layer->info(); |
| 936 | if (info.object_type == sdk::BuiltinObjectType::kRobotDescription) { |
| 937 | // Robot layers get a Model/URDF row, not a Topics-list row. Idempotent, so |
| 938 | // a row already created by onAddModelClicked is not duplicated here. |
| 939 | addRobotRow(info.topic_id.id, info.display_name, info.display_name); |
| 940 | return; |
| 941 | } |
| 942 | layer_list_->addRow(rowFromLayerInfo(info)); |
| 943 | const auto warning = bound_dock_->orphanState(topic_id); |
| 944 | layer_list_->setRowWarning(static_cast<qint64>(topic_id.id), warning.is_orphan, warning.reason); |
| 945 | // A new same-family sibling can enable the apply-to-family button. |
| 946 | updateParamsToolbarState(); |
| 947 | } |
| 948 | |
| 949 | void Scene3DConfigPanel::onLayerRemoved(ObjectTopicId topic_id) { |
| 950 | layer_list_->removeRow(static_cast<qint64>(topic_id.id)); |
nothing calls this directly
no test coverage detected