diff options
author | David Robillard <d@drobilla.net> | 2008-10-12 08:45:55 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-10-12 08:45:55 +0000 |
commit | 141c34e297b1ffde3293c42f26181bd3d895b2c4 (patch) | |
tree | b37d3b7ac7e3c0ccb6957cdc5d510bcbbc7db382 /src/gui | |
parent | 9f0415450bba9b0c32dfd1b9c4033f57806c35cc (diff) | |
download | ingen-141c34e297b1ffde3293c42f26181bd3d895b2c4.tar.gz ingen-141c34e297b1ffde3293c42f26181bd3d895b2c4.tar.bz2 ingen-141c34e297b1ffde3293c42f26181bd3d895b2c4.zip |
Fix Om patch loading (import and load as child).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1656 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/ThreadedLoader.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp index 530c3840..0dd1b1dd 100644 --- a/src/gui/ThreadedLoader.cpp +++ b/src/gui/ThreadedLoader.cpp @@ -90,27 +90,31 @@ ThreadedLoader::load_patch(bool merge, { _mutex.lock(); - // FIXME: Filthy hack to load deprecated patches based on file extension + Glib::ustring engine_base = ""; + if (engine_parent) { + cout << "A " << merge << endl; + if (merge) + engine_base = engine_parent.get(); + else + engine_base = engine_parent.get().base(); + } + + + + // Filthy hack to load deprecated patches based on file extension if (data_base_uri.substr(data_base_uri.length()-3) == ".om") { _events.push_back(sigc::hide_return(sigc::bind( sigc::mem_fun(_deprecated_loader, &DeprecatedLoader::load_patch), data_base_uri, + merge, engine_parent, - engine_symbol ? (string)engine_symbol.get() : string(""), + engine_symbol, engine_data, false))); } else { - Glib::ustring engine_base = ""; - if (engine_parent) { - if (merge) - engine_base = engine_parent.get(); - else - engine_base = engine_parent.get().base(); - } - if (merge && (!engine_parent || engine_parent.get() == "/")) engine_base = engine_base.substr(0, engine_base.find_last_of("/")); - + _events.push_back(sigc::hide_return(sigc::bind( sigc::mem_fun(_parser.get(), &Ingen::Serialisation::Parser::parse_document), App::instance().world(), |