Move check for image collection is loaded in order to improve interaction

This commit is contained in:
Ylva Selling
2022-04-27 17:13:24 -04:00
parent 673b7f2325
commit f89301a70a
2 changed files with 5 additions and 5 deletions

View File

@@ -52,10 +52,6 @@ namespace {
if (module->isCameraInSolarSystem()) {
TargetBrowserPair* selected = module->getPair(module->selectedBrowserId());
if (selected) {
if (!selected->isImageCollectionLoaded()) {
LINFO("Image collection is not yet loaded to AAS WorldWide Telescope");
return;
}
const ImageData& image = module->getWwtDataHandler()->getImage(imageIndex);
// Load image into browser
std::string str = image.name;

View File

@@ -48,7 +48,11 @@ void WwtCommunicator::selectImage(const std::string& url, int i) {
if (it == _selectedImages.end()) {
// Push newly selected image to front
_selectedImages.push_front(i);
addImageLayerToWwt(url, i);
// If wwt has not loaded the collection yet, wait with passing the message
if (_isImageCollectionLoaded) {
addImageLayerToWwt(url, i);
}
}
}