Merge branch 'feature/globebrowsing' of github.com:OpenSpace/OpenSpace-Development into feature/globebrowsing

This commit is contained in:
Erik Broberg
2016-06-14 23:19:45 -04:00
3 changed files with 21 additions and 9 deletions

View File

@@ -149,7 +149,7 @@ namespace openspace {
std::vector<properties::BoolProperty>& dest)
{
for (size_t i = 0; i < tileProviders.size(); i++) {
bool enabled = i == 0; // Only enable first layer
bool enabled = tileProviders[i].isActive;
std::string name = tileProviders[i].name;
dest.push_back(properties::BoolProperty(name, name, enabled));
}

View File

@@ -90,15 +90,17 @@ namespace openspace {
// Create TileProviders for all textures within this category
for (size_t i = 0; i < texturesDict.size(); i++) {
std::string name, path;
// Default to enabled = true on case it's not defined in the dictionary
bool enabled = true;
std::string dictKey = std::to_string(i + 1);
ghoul::Dictionary texDict = texturesDict.value<ghoul::Dictionary>(dictKey);
texDict.getValue("Name", name);
texDict.getValue("FilePath", path);
texDict.getValue("Enabled", enabled);
std::shared_ptr<TileProvider> tileProvider = initProvider(path, initData);
bool enabled = dest.size() == 0; // Only enable first layer
//bool enabled = dest.size() == 0; // Only enable first layer
dest.push_back({ name, tileProvider, enabled });
}
}