Mercurial > hg > svapp
comparison framework/Document.cpp @ 700:7669c8cc869d
Use layer->getSourceModel
author | Chris Cannam |
---|---|
date | Fri, 02 Aug 2019 16:50:20 +0100 |
parents | a27a6113fdd7 |
children | b8bf2900a478 |
comparison
equal
deleted
inserted
replaced
699:46ab91e26bfe | 700:7669c8cc869d |
---|---|
1354 for (LayerViewMap::const_iterator i = m_layerViewMap.begin(); | 1354 for (LayerViewMap::const_iterator i = m_layerViewMap.begin(); |
1355 i != m_layerViewMap.end(); ++i) { | 1355 i != m_layerViewMap.end(); ++i) { |
1356 | 1356 |
1357 if (i->first && !i->second.empty()) { // Layer exists, is in views | 1357 if (i->first && !i->second.empty()) { // Layer exists, is in views |
1358 ModelId modelId = i->first->getModel(); | 1358 ModelId modelId = i->first->getModel(); |
1359 if (auto model = ModelById::get(modelId)) { | 1359 ModelId sourceId = i->first->getSourceModel(); |
1360 used.insert(modelId); | 1360 if (!modelId.isNone()) used.insert(modelId); |
1361 if (!model->getSourceModel().isNone()) { | 1361 if (!sourceId.isNone()) used.insert(sourceId); |
1362 used.insert(model->getSourceModel()); | |
1363 } | |
1364 } | |
1365 } | 1362 } |
1366 } | 1363 } |
1367 | 1364 |
1368 // Write aggregate models first, so that when re-reading | 1365 // Write aggregate models first, so that when re-reading |
1369 // derivations we already know about their existence. But only | 1366 // derivations we already know about their existence. But only |