+ 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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user