summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-22 08:00:59 +0000
committerDavid Robillard <d@drobilla.net>2008-11-22 08:00:59 +0000
commitcda796269b903899edcbc479dbdc3c7dacb944c5 (patch)
treeb64164e3d916127f5adefd6b8bb6379bd5ea41a8 /src/gui
parentfc397802d408441ce354c5b0328adc93f617aca5 (diff)
downloadingen-cda796269b903899edcbc479dbdc3c7dacb944c5.tar.gz
ingen-cda796269b903899edcbc479dbdc3c7dacb944c5.tar.bz2
ingen-cda796269b903899edcbc479dbdc3c7dacb944c5.zip
Finer grained locking on RDF world lock when parsing: prevents deadlock on loading massive patches that fill the event queue.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1765 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/PatchCanvas.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 0d444ad3..c2cef4c8 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -646,7 +646,7 @@ PatchCanvas::paste()
parser->parse_string(App::instance().world(), &avoider, str, "/", _patch->path());
for (Store::iterator i = clipboard.begin(); i != clipboard.end(); ++i) {
- cout << "************ OBJECT: " << i->first << endl;
+ //cout << "************ OBJECT: " << i->first << endl;
if (_patch->path() == "/" && i->first == "/") {
//cout << "SKIPPING ROOT " << _patch->path() << " :: " << i->first << endl;
continue;
@@ -670,11 +670,17 @@ PatchCanvas::paste()
builder.build(_patch->path(), i->second);
}
- //avoider.set_target(*App::instance().engine());
+ // Successful connections
+ SharedPtr<PatchModel> root = PtrCast<PatchModel>(clipboard.object("/"));
+ assert(root);
+ for (Patch::Connections::const_iterator i = root->connections().begin();
+ i != root->connections().end(); ++i) {
+ App::instance().engine()->connect((*i)->src_port_path(), (*i)->dst_port_path());
+ }
+ // Orphan connections (just in case...)
for (ClientStore::ConnectionRecords::const_iterator i = clipboard.connection_records().begin();
i != clipboard.connection_records().end(); ++i) {
- cout << "CONNECTING " << i->first << " -> " << i->second << endl;
App::instance().engine()->connect(i->first, i->second);
}
}