35 */ |
35 */ |
36 ModelId DocumentManager::newModel() |
36 ModelId DocumentManager::newModel() |
37 { |
37 { |
38 const ModelId modelId{++this->modelIdCounter}; |
38 const ModelId modelId{++this->modelIdCounter}; |
39 this->openModels.emplace(std::make_pair(modelId, ModelInfo{ |
39 this->openModels.emplace(std::make_pair(modelId, ModelInfo{ |
|
40 .model = std::make_unique<Model>(this), |
40 .id = modelId, |
41 .id = modelId, |
41 .opentype = OpenType::ManuallyOpened, |
42 .opentype = OpenType::ManuallyOpened, |
42 })); |
43 })); |
43 this->makePolygonCacheForModel(modelId); |
44 this->makePolygonCacheForModel(modelId); |
44 return modelId; |
45 return modelId; |