MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / rebuildLayerList

Method rebuildLayerList

pj_app/src/ui/Scene3DConfigPanel.cpp:894–921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

892}
893
894void Scene3DConfigPanel::rebuildLayerList() {
895 if (bound_dock_ == nullptr) {
896 layer_list_->clearRows();
897 updateSelectedLayerPane();
898 return;
899 }
900
901 std::vector<LayerRow> rows;
902 const auto layers = bound_dock_->layers();
903 rows.reserve(layers.size());
904 for (const SceneLayerInfo& info : layers) {
905 // Robot-model layers stay out of the Topics list; they get a dedicated row
906 // under the Model/URDF selector, rebuilt here from dock state (so layout
907 // restore and dock switches recover the rows — bindDock cleared them).
908 if (info.object_type == sdk::BuiltinObjectType::kRobotDescription) {
909 addRobotRow(info.topic_id.id, info.display_name, info.display_name);
910 continue;
911 }
912 rows.push_back(rowFromLayerInfo(info));
913 }
914 layer_list_->setRows(rows);
915
916 for (const LayerRow& row : rows) {
917 const auto warning = bound_dock_->orphanState(topicFromRowId(row.id));
918 layer_list_->setRowWarning(row.id, warning.is_orphan, warning.reason);
919 }
920 updateSelectedLayerPane();
921}
922
923void Scene3DConfigPanel::onLayerSelectionChanged() {
924 updateSelectedLayerPane();

Callers

nothing calls this directly

Calls 9

rowFromLayerInfoFunction · 0.85
topicFromRowIdFunction · 0.85
clearRowsMethod · 0.80
layersMethod · 0.80
reserveMethod · 0.80
orphanStateMethod · 0.80
setRowWarningMethod · 0.80
sizeMethod · 0.45
setRowsMethod · 0.45

Tested by

no test coverage detected