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

@@ -137,11 +137,13 @@ IF((APPLE AND BUILD_AS_BUNDLE) OR WIN32)
# Install needed Qt plugins by copying directories from the qt installation # Install needed Qt plugins by copying directories from the qt installation
# One can cull what gets copied by using 'REGEX "..." EXCLUDE' # One can cull what gets copied by using 'REGEX "..." EXCLUDE'
# Exclude debug libraries # Exclude debug libraries
INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" IF(QT_PLUGINS_DIR)
INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats"
DESTINATION ${plugin_dest_dir}/plugins DESTINATION ${plugin_dest_dir}/plugins
COMPONENT runtime COMPONENT runtime
REGEX ".*d4.dll" EXCLUDE REGEX ".*d4.dll" EXCLUDE
REGEX ".*d4.a" EXCLUDE) REGEX ".*d4.a" EXCLUDE)
ENDIF(QT_PLUGINS_DIR)
# install a qt.conf file # install a qt.conf file
# this inserts some cmake code into the install script to write the file # this inserts some cmake code into the install script to write the file

View File

@@ -1889,10 +1889,13 @@ void MainWindow::updateMapCloud(
_cloudViewer->setCloudOpacity(cloudName, _preferencesDialog->getCloudOpacity(0)); _cloudViewer->setCloudOpacity(cloudName, _preferencesDialog->getCloudOpacity(0));
_cloudViewer->setCloudPointSize(cloudName, _preferencesDialog->getCloudPointSize(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)); 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)) else if(viewerClouds.contains(cloudName))