src/documentmanager.cpp

changeset 194
be056e87c8ca
parent 193
b4beff48bb7a
child 195
6e79c1cb83e6
equal deleted inserted replaced
193:b4beff48bb7a 194:be056e87c8ca
378 } 378 }
379 379
380 void DocumentManager::modelModified() 380 void DocumentManager::modelModified()
381 { 381 {
382 Model* model = qobject_cast<Model*>(this->sender()); 382 Model* model = qobject_cast<Model*>(this->sender());
383 for (auto it = this->openModels.begin(); it != this->openModels.end(); ++it) { 383 const std::optional<ModelId> modelId = this->findIdForModel(model);
384 if (model == it->second.model.get()) { 384 if (modelId.has_value()) {
385 this->polygonCaches[it->second.id].needRecache = true; 385 this->polygonCaches[*modelId].needRecache = true;
386 break;
387 }
388 } 386 }
389 } 387 }
390 388
391 static QString findFile(QString referenceName, const QString& path, const LibraryManager& libraries) 389 static QString findFile(QString referenceName, const QString& path, const LibraryManager& libraries)
392 { 390 {

mercurial