diff options
author | David Robillard <d@drobilla.net> | 2007-10-08 16:30:57 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-08 16:30:57 +0000 |
commit | 763bba9de67fb1bd06658a0bac91440727ee5a51 (patch) | |
tree | 39e7af069828981c2c06d78e015686062eba73dc /src/libs/gui | |
parent | 260a406b12997fdab7446a9980e921d8cfc46915 (diff) | |
download | ingen-763bba9de67fb1bd06658a0bac91440727ee5a51.tar.gz ingen-763bba9de67fb1bd06658a0bac91440727ee5a51.tar.bz2 ingen-763bba9de67fb1bd06658a0bac91440727ee5a51.zip |
SharedPtr-ify engine side store.
Fix reattaching to engine.
Fix connection paths.
Remove last dependencies on client (model) library from Serialiser.
Fix Raul::PathTable::find_descendants_end.
git-svn-id: http://svn.drobilla.net/lad/ingen@847 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui')
-rw-r--r-- | src/libs/gui/PatchCanvas.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp index ac86b3fb..7cd31cb3 100644 --- a/src/libs/gui/PatchCanvas.cpp +++ b/src/libs/gui/PatchCanvas.cpp @@ -209,9 +209,9 @@ PatchCanvas::build() } // Create connections - for (list<SharedPtr<ConnectionModel> >::const_iterator i = _patch->connections().begin(); + for (PatchModel::Connections::const_iterator i = _patch->connections().begin(); i != _patch->connections().end(); ++i) { - connection(*i); + connection(PtrCast<ConnectionModel>(*i)); } } @@ -306,15 +306,18 @@ PatchCanvas::get_port_view(SharedPtr<PortModel> port) void PatchCanvas::connection(SharedPtr<ConnectionModel> cm) { + assert(cm); + const SharedPtr<FlowCanvas::Port> src = get_port_view(cm->src_port()); const SharedPtr<FlowCanvas::Port> dst = get_port_view(cm->dst_port()); - if (src && dst) + if (src && dst) { add_connection(boost::shared_ptr<GUI::Connection>(new GUI::Connection(shared_from_this(), cm, src, dst, src->color() + 0x22222200))); - else + } else { cerr << "[PatchCanvas] ERROR: Unable to find ports to connect " << cm->src_port_path() << " -> " << cm->dst_port_path() << endl; + } } |