Added SaveCopy command

This command saves a copy of the current document under a new name,
without modifying the document itself.

Available in menu File -> Save a Copy or from python with
FreeCAD.ActiveDocument.saveCopy(filename)
This commit is contained in:
Yorik van Havre
2015-09-02 13:38:14 -03:00
parent 3b433256e6
commit e122ea8bf7
9 changed files with 113 additions and 2 deletions

View File

@@ -701,6 +701,10 @@ bool View3DInventor::onMsg(const char* pMsg, const char** ppReturn)
getGuiDocument()->saveAs();
return true;
}
else if (strcmp("SaveCopy",pMsg) == 0) {
getGuiDocument()->saveCopy();
return true;
}
else
return false;
}
@@ -711,6 +715,8 @@ bool View3DInventor::onHasMsg(const char* pMsg) const
return true;
else if (strcmp("SaveAs",pMsg) == 0)
return true;
else if (strcmp("SaveCopy",pMsg) == 0)
return true;
else if (strcmp("Undo",pMsg) == 0) {
App::Document* doc = getAppDocument();
return doc && doc->getAvailableUndos() > 0;