+ suppress warnings when copying an object
This commit is contained in:
parent
fe8be472a9
commit
02578c4e6b
|
@ -2205,6 +2205,8 @@ DocumentObject* Document::copyObject(DocumentObject* obj, bool recursive)
|
|||
objs.push_back(obj);
|
||||
|
||||
MergeDocuments md(this);
|
||||
// if not copying recursively then suppress possible warnings
|
||||
md.setVerbose(recursive);
|
||||
if (recursive) {
|
||||
objs = obj->getDocument()->getDependencyList(objs);
|
||||
}
|
||||
|
|
|
@ -127,6 +127,7 @@ MergeDocuments::importObjects(std::istream& input)
|
|||
this->nameMap.clear();
|
||||
this->stream = new zipios::ZipInputStream(input);
|
||||
XMLMergeReader reader(this->nameMap,"<memory>", *stream);
|
||||
reader.setVerbose(isVerbose());
|
||||
std::vector<App::DocumentObject*> objs = appdoc->importObjects(reader);
|
||||
|
||||
delete this->stream;
|
||||
|
|
|
@ -39,6 +39,8 @@ class AppExport MergeDocuments : public Base::Persistence
|
|||
public:
|
||||
MergeDocuments(App::Document* doc);
|
||||
~MergeDocuments();
|
||||
bool isVerbose() const { return verbose; }
|
||||
void setVerbose(bool on) { verbose = on; }
|
||||
unsigned int getMemSize (void) const;
|
||||
std::vector<App::DocumentObject*> importObjects(std::istream&);
|
||||
void importObject(const std::vector<App::DocumentObject*>& o, Base::XMLReader & r);
|
||||
|
@ -50,6 +52,7 @@ public:
|
|||
|
||||
private:
|
||||
bool guiup;
|
||||
bool verbose;
|
||||
zipios::ZipInputStream* stream;
|
||||
App::Document* appdoc;
|
||||
std::vector<App::DocumentObject*> objects;
|
||||
|
|
Loading…
Reference in New Issue
Block a user