Improve UUID handling of documents

This commit is contained in:
wmayer
2013-05-04 18:05:39 +02:00
parent 3a591b3a94
commit 0c378f12dc
3 changed files with 37 additions and 48 deletions

View File

@@ -421,23 +421,6 @@ Document* Application::openDocument(const char * FileName)
// read the document
newDoc->restore();
// make sure that the uuid is unique
//FIXME: See Document::saveAs()
#if 0
std::string uuid = newDoc->Uid.getValueStr();
for (std::map<std::string,Document*>::iterator it = DocMap.begin(); it != DocMap.end(); ++it) {
if (newDoc != it->second) {
if (uuid == it->second->Uid.getValueStr()) {
Base::Uuid id;
newDoc->Uid.setValue(id);
Base::Console().Warning("Document with the UUID '%s' already exists, change to '%s'\n",
uuid.c_str(), id.getValue().c_str());
break;
}
}
}
#endif
return newDoc;
}