summaryrefslogtreecommitdiffstats
path: root/src/gui/PatchPortModule.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-06-07 02:44:16 +0000
committerDavid Robillard <d@drobilla.net>2011-06-07 02:44:16 +0000
commitd42b83ffe581651886ca0874b6b75dcbb6127aea (patch)
tree0fd2f18a1c7748fc2f2287cd19d6e546100b6ce3 /src/gui/PatchPortModule.cpp
parent92de17413f62e973b21447a6001371ca98e025e0 (diff)
downloadingen-d42b83ffe581651886ca0874b6b75dcbb6127aea.tar.gz
ingen-d42b83ffe581651886ca0874b6b75dcbb6127aea.tar.bz2
ingen-d42b83ffe581651886ca0874b6b75dcbb6127aea.zip
Remove use of smart pointers in FlowCanvas entirely.
Since FlowCanvas's containers own their children, there is no real benefit to using smart pointers for objects, though there is overhead. There are no longer any add or remove methods for containers, simply create (new) and destroy (delete) objects and things should work as expected. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3366 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/PatchPortModule.cpp')
-rw-r--r--src/gui/PatchPortModule.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp
index b04cc6ba..df4d8dc8 100644
--- a/src/gui/PatchPortModule.cpp
+++ b/src/gui/PatchPortModule.cpp
@@ -59,9 +59,8 @@ PatchPortModule::create(PatchCanvas& canvas,
bool human)
{
boost::shared_ptr<PatchPortModule> ret(new PatchPortModule(canvas, model));
- boost::shared_ptr<Port> port(Port::create(ret, model, human, true));
+ boost::shared_ptr<Port> port(Port::create(*ret, model, human, true));
- ret->add_port(port);
ret->set_port(port);
ret->set_menu(port->menu());
@@ -149,9 +148,9 @@ PatchPortModule::property_changed(const URI& key, const Atom& value)
} else if (key == uris.ingen_selected) {
if (value.get_bool() != selected()) {
if (value.get_bool()) {
- _canvas->select_item(shared_from_this());
+ _canvas->select_item(this);
} else {
- _canvas->unselect_item(shared_from_this());
+ _canvas->unselect_item(this);
}
}
}