aboutsummaryrefslogtreecommitdiffstats
path: root/src/gui/EdgeView.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-13 07:49:49 +0000
committerDavid Robillard <d@drobilla.net>2013-01-13 07:49:49 +0000
commit67a8adbc93991acfb688f378f52392995a272fac (patch)
treea4e629bd9c0d7da4cc5c7cb644b3352ca6f0dc78 /src/gui/EdgeView.cpp
parent33aa54fa98783d1da2a322ee136c17df7f9c98a5 (diff)
downloadmachina-67a8adbc93991acfb688f378f52392995a272fac.tar.gz
machina-67a8adbc93991acfb688f378f52392995a272fac.tar.bz2
machina-67a8adbc93991acfb688f378f52392995a272fac.zip
Change model to have a single initial node.
Merge multiple recording into branches off the same initial node. Make transport state sane with 3 distinct states. Handle announcing objects several times correctly. Don't send useless zero coordinates for new nodes, position in visible area. Rewrite and clean up Machine code. Update help. git-svn-id: http://svn.drobilla.net/lad/trunk/machina@4954 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/EdgeView.cpp')
-rw-r--r--src/gui/EdgeView.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/EdgeView.cpp b/src/gui/EdgeView.cpp
index ec77a7b..da267e8 100644
--- a/src/gui/EdgeView.cpp
+++ b/src/gui/EdgeView.cpp
@@ -65,10 +65,10 @@ inline static uint32_t edge_color(float prob)
using namespace Ganv;
EdgeView::EdgeView(Canvas& canvas,
- SPtr<NodeView> src,
- SPtr<NodeView> dst,
+ NodeView* src,
+ NodeView* dst,
SPtr<machina::client::ClientObject> edge)
- : Ganv::Edge(canvas, src.get(), dst.get(), 0x9FA0A0F4, true, false)
+ : Ganv::Edge(canvas, src, dst, 0x9FA0A0F4, true, false)
, _edge(edge)
{
set_color(edge_color(probability()));
@@ -80,6 +80,11 @@ EdgeView::EdgeView(Canvas& canvas,
sigc::mem_fun(this, &EdgeView::on_event));
}
+EdgeView::~EdgeView()
+{
+ _edge->set_view(NULL);
+}
+
float
EdgeView::probability() const
{