mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-08 20:50:19 -06:00
Move check for image collection is loaded in order to improve interaction
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user