Navigation Menu

Skip to content

Commit

Permalink
+ suppress warnings when copying an object
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Feb 9, 2016
1 parent fe8be47 commit 02578c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/App/Document.cpp
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions src/App/MergeDocuments.cpp
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/App/MergeDocuments.h
Expand Up @@ -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);
Expand All @@ -50,6 +52,7 @@ class AppExport MergeDocuments : public Base::Persistence

private:
bool guiup;
bool verbose;
zipios::ZipInputStream* stream;
App::Document* appdoc;
std::vector<App::DocumentObject*> objects;
Expand Down

0 comments on commit 02578c4

Please sign in to comment.