gui: fixed odom local map hiding on rtabmap update

This commit is contained in:
matlabbe
2019-01-09 13:50:12 -05:00
parent 2a8e5be361
commit d63f9e736e
2 changed files with 7 additions and 11 deletions

View File

@@ -2388,18 +2388,13 @@ void MainWindow::updateMapCloud(
if(splitted.size() == 2)
{
id = std::atoi(splitted.back().c_str());
if(splitted.front().at(splitted.front().size()-1) == '-')
if(poses.find(id) == poses.end())
{
id*=-1;
}
}
if(poses.find(id) == poses.end())
{
if(_cloudViewer->getCloudVisibility(iter.key()))
{
UDEBUG("Hide %s", iter.key().c_str());
_cloudViewer->setCloudVisibility(iter.key(), false);
if(_cloudViewer->getCloudVisibility(iter.key()))
{
UDEBUG("Hide %s", iter.key().c_str());
_cloudViewer->setCloudVisibility(iter.key(), false);
}
}
}
}