diff options
author | David Robillard <d@drobilla.net> | 2006-06-12 01:13:38 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-06-12 01:13:38 +0000 |
commit | 699d3265031702602bdf4d6748b43ff14f2af72f (patch) | |
tree | d0b2e4c0a1f61ad968e9aa9b20bcedcf076a821e /src/progs/gtk/PatchController.cpp | |
parent | 190e2cf3c91f8bd5b1a6f69d00e84a108c743898 (diff) | |
download | ingen-699d3265031702602bdf4d6748b43ff14f2af72f.tar.gz ingen-699d3265031702602bdf4d6748b43ff14f2af72f.tar.bz2 ingen-699d3265031702602bdf4d6748b43ff14f2af72f.zip |
Connections working through Store model/signal interface
git-svn-id: http://svn.drobilla.net/lad/grauph@30 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/gtk/PatchController.cpp')
-rw-r--r-- | src/progs/gtk/PatchController.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/progs/gtk/PatchController.cpp b/src/progs/gtk/PatchController.cpp index 90ffe005..ada6b003 100644 --- a/src/progs/gtk/PatchController.cpp +++ b/src/progs/gtk/PatchController.cpp @@ -72,6 +72,7 @@ PatchController::PatchController(CountedPtr<PatchModel> model) }*/ model->new_node_sig.connect(sigc::mem_fun(this, &PatchController::add_node)); + model->new_connection_sig.connect(sigc::mem_fun(this, &PatchController::connection)); } @@ -338,7 +339,7 @@ PatchController::create_view() } // Create connections - for (list<ConnectionModel*>::const_iterator i = patch_model()->connections().begin(); + for (list<CountedPtr<ConnectionModel> >::const_iterator i = patch_model()->connections().begin(); i != patch_model()->connections().end(); ++i) { create_connection(*i); } @@ -351,7 +352,7 @@ PatchController::create_view() /** Create a connection in the view (canvas). */ void -PatchController::create_connection(const ConnectionModel* cm) +PatchController::create_connection(CountedPtr<ConnectionModel> cm) { m_patch_view->canvas()->add_connection( cm->src_port_path().parent().name(), @@ -575,11 +576,11 @@ PatchController::remove_port(const Path& path, bool resize_module) void -PatchController::connection(ConnectionModel* const cm) +PatchController::connection(CountedPtr<ConnectionModel> cm) { - assert(cm != NULL); + assert(cm); - patch_model()->add_connection(cm); + //patch_model()->add_connection(cm); if (m_patch_view != NULL) create_connection(cm); |