src/documentmanager.cpp

changeset 217
6d95c1a41e6e
parent 214
8e1fe64ce4e3
child 230
a1f3f7d9078b
equal deleted inserted replaced
216:c7241f504117 217:6d95c1a41e6e
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;

mercurial