+ Make transient directory of the form ExeName_Doc_{UUID}_{HASH}_{PID}

+ Set some properties in Document read-only

+ Implement Document::saveAs

+ Fix PropertyUUID::setValue()

+ Add a field for UUID in document information panel
This commit is contained in:
wmayer
2013-05-04 03:16:34 +02:00
parent 9ad4bb5595
commit 2bbe465229
9 changed files with 216 additions and 112 deletions

View File

@@ -421,6 +421,23 @@ 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;
}