Skip to content
Snippets Groups Projects
Commit b0146272 authored by Nikolaus Vahrenkamp's avatar Nikolaus Vahrenkamp
Browse files

fixed Polygon and Arrow drawings

parent 197a6e97
No related branches found
No related tags found
No related merge requests found
......@@ -415,6 +415,7 @@ void DebugDrawerComponent::removeLine(const std::string& layerName, const std::s
{
return;
}
layer.mainNode->removeChild(layer.addedLineVisualizations[name]);
layer.addedLineVisualizations.erase(name);
}
......@@ -499,7 +500,10 @@ void DebugDrawerComponent::removePolygon(const std::string &layerName, const std
{
return;
}
if (layer.mainNode && layer.mainNode->findChild(layer.addedPolygonVisualizations[name]) >= 0)
{
layer.mainNode->removeChild(layer.addedPolygonVisualizations[name]);
}
layer.mainNode->removeChild(layer.addedPolygonVisualizations[name]);
layer.addedPolygonVisualizations.erase(name);
}
......@@ -516,8 +520,10 @@ void DebugDrawerComponent::removeArrow(const std::string &layerName, const std::
{
return;
}
layer.mainNode->removeChild(layer.addedArrowVisualizations[name]);
if (layer.mainNode && layer.mainNode->findChild(layer.addedArrowVisualizations[name]) >= 0)
{
layer.mainNode->removeChild(layer.addedArrowVisualizations[name]);
}
layer.addedArrowVisualizations.erase(name);
}
......@@ -943,6 +949,8 @@ void DebugDrawerComponent::clearLayer(const std::string &layerName, const Ice::C
layer.addedTextVisualizations.clear();
layer.addedSphereVisualizations.clear();
layer.addedPointCloudVisualizations.clear();
layer.addedPolygonVisualizations.clear();
layer.addedArrowVisualizations.clear();
layer.mainNode->removeAllChildren();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment