Commit 237585ec authored by Bernhard Beschow's avatar Bernhard Beschow

keep documents requested by the map theme

parent d9423173
......@@ -336,7 +336,6 @@ void MarbleModel::setMapTheme( GeoSceneDocument *document )
Q_ASSERT( data );
bool skip = false;
GeoDataDocument *doc = nullptr;
int datasetIndex = -1;
for ( int i = 0; i < currentDatasets.size(); ++i ) {
if ( currentDatasets[i] == *data ) {
currentDatasets.removeAt( i );
......@@ -350,15 +349,14 @@ void MarbleModel::setMapTheme( GeoSceneDocument *document )
*/
if ( currentDatasets[i].sourceFile() == data->sourceFile() ) {
doc = d->m_fileManager.at(data->sourceFile());
datasetIndex = i;
currentDatasets.removeAt(i);
}
}
if ( skip ) {
continue;
}
if (doc && !currentDatasets[datasetIndex].colors().isEmpty()) {
currentDatasets.removeAt( datasetIndex );
if (doc) {
d->assignFillColors(doc, *data);
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment