Gui: [skip ci] show program version a file was created with in project information dialog

This commit is contained in:
wmayer
2020-06-14 17:52:02 +02:00
parent f5a5bf7900
commit 4a64679422
4 changed files with 50 additions and 16 deletions

View File

@@ -182,6 +182,7 @@ struct DocumentP
int iUndoMode;
unsigned int UndoMemSize;
unsigned int UndoMaxStackSize;
std::string programVersion;
#ifdef USE_OLD_DAG
DependencyList DepList;
std::map<DocumentObject*,Vertex> VertexObjectList;
@@ -2731,7 +2732,9 @@ void Document::restore (const char *filename,
catch (const Base::Exception& e) {
Base::Console().Error("Invalid Document.xml: %s\n", e.what());
}
d->partialLoadObjects.clear();
d->programVersion = reader.ProgramVersion;
// Special handling for Gui document, the view representations must already
// exist, what is done in Restore().
@@ -2886,6 +2889,11 @@ std::string Document::getFullName() const {
return myName;
}
const char* Document::getProgramVersion() const
{
return d->programVersion.c_str();
}
/// Remove all modifications. After this call The document becomes valid again.
void Document::purgeTouched()
{