From f31f6e53c139e194d0d0b4f24b7988c5c3652727 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 18 Aug 2008 19:02:13 +0000 Subject: Fix copy/paste between different patches. Barf less serialisation stuff to the console. git-svn-id: http://svn.drobilla.net/lad/ingen@1431 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/PatchCanvas.cpp | 8 ++++---- src/libs/gui/ThreadedLoader.cpp | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'src/libs/gui') diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp index 2ea4496c..4fcafdc3 100644 --- a/src/libs/gui/PatchCanvas.cpp +++ b/src/libs/gui/PatchCanvas.cpp @@ -589,17 +589,17 @@ PatchCanvas::paste() clipboard.set_plugins(App::instance().store()->plugins()); clipboard.new_patch("/", _patch->poly()); - ClashAvoider avoider(*App::instance().store().get(), _patch->path(), clipboard); - //parser->parse_string(App::instance().world(), &avoider, str, _patch->path().base()); + ClashAvoider avoider(*App::instance().store().get(), _patch->path(), clipboard, &clipboard); parser->parse_string(App::instance().world(), &avoider, str, "/", boost::optional(), (Glib::ustring)_patch->path()); for (Store::iterator i = clipboard.begin(); i != clipboard.end(); ++i) { + cout << "************ OBJECT: " << i->first << endl; if (_patch->path() == "/" && i->first == "/") { - //cout << "SKIPPING ROOT " << _patch->path() << " :: " << i->first << endl; + cout << "SKIPPING ROOT " << _patch->path() << " :: " << i->first << endl; continue; } else if (i->first.parent() != "/") { - //cout << "SKIPPING NON ROOTED OBJECT " << i->first << endl; + cout << "SKIPPING NON ROOTED OBJECT " << i->first << endl; continue; } GraphObject::Variables::iterator x = i->second->variables().find("ingenuity:canvas-x"); diff --git a/src/libs/gui/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp index 86c4ea1c..24edc69a 100644 --- a/src/libs/gui/ThreadedLoader.cpp +++ b/src/libs/gui/ThreadedLoader.cpp @@ -108,12 +108,9 @@ ThreadedLoader::load_patch(bool merge, engine_base = engine_parent.get().base(); } - cout << "ENGINE BASE 1: " << engine_base << endl; - if (merge && engine_parent.get() == "/" || !engine_parent) + if (merge && (engine_parent.get() == "/" || !engine_parent)) engine_base = engine_base.substr(0, engine_base.find_last_of("/")); - cout << "ENGINE BASE: " << engine_base << endl; - cout << "PARENT: " << (engine_parent ? (string)engine_parent.get() : "NONE") << endl; _events.push_back(sigc::hide_return(sigc::bind( sigc::mem_fun(_parser.get(), &Ingen::Serialisation::Parser::parse_document), App::instance().world(), -- cgit v1.2.1