MainWindow: Don't show an error if a created cloud is empty

This commit is contained in:
matlabbe
2016-06-02 17:52:22 -04:00
parent d9611f784c
commit 2f817568e2
2 changed files with 8 additions and 3 deletions

View File

@@ -1889,10 +1889,13 @@ void MainWindow::updateMapCloud(
_cloudViewer->setCloudOpacity(cloudName, _preferencesDialog->getCloudOpacity(0));
_cloudViewer->setCloudPointSize(cloudName, _preferencesDialog->getCloudPointSize(0));
}
else if(_cachedSignatures.contains(iter->first))
else if(_createdClouds.find(iter->first) != _createdClouds.end() && _cachedSignatures.contains(iter->first))
{
this->createAndAddCloudToMap(iter->first, iter->second, uValue(mapIds, iter->first, -1));
_cloudViewer->setCloudVisibility(cloudName.c_str(), _cloudViewer->isVisible() && _preferencesDialog->isCloudsShown(0));
if(_createdClouds.find(iter->first) != _createdClouds.end())
{
_cloudViewer->setCloudVisibility(cloudName.c_str(), _cloudViewer->isVisible() && _preferencesDialog->isCloudsShown(0));
}
}
}
else if(viewerClouds.contains(cloudName))