aboutsummaryrefslogtreecommitdiffstats
path: root/src/gui/NodeView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/NodeView.cpp')
-rw-r--r--src/gui/NodeView.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/gui/NodeView.cpp b/src/gui/NodeView.cpp
index a73b996..d1bd913 100644
--- a/src/gui/NodeView.cpp
+++ b/src/gui/NodeView.cpp
@@ -45,6 +45,12 @@ NodeView::NodeView(Gtk::Window* window,
signal_event().connect(
sigc::mem_fun(this, &NodeView::on_event));
+ MachinaCanvas* mcanvas = dynamic_cast<MachinaCanvas*>(&canvas);
+ if (is(mcanvas->app()->forge(), URIs::instance().machina_initial)) {
+ set_border_width(4.0);
+ set_label("init");
+ }
+
node->signal_property.connect(
sigc::mem_fun(this, &NodeView::on_property));
@@ -53,6 +59,11 @@ NodeView::NodeView(Gtk::Window* window,
}
}
+NodeView::~NodeView()
+{
+ _node->set_view(NULL);
+}
+
bool
NodeView::on_double_click(GdkEventButton*)
{
@@ -77,12 +88,6 @@ NodeView::on_event(GdkEvent* event)
if (event->button.button == 1) {
canvas->app()->controller()->set_property(
_node->id(),
- URIs::instance().machina_initial,
- forge.make(!is(forge, URIs::instance().machina_initial)));
- return true;
- } else if (event->button.button == 3) {
- canvas->app()->controller()->set_property(
- _node->id(),
URIs::instance().machina_selector,
forge.make(!is(forge, URIs::instance().machina_selector)));
return true;
@@ -133,7 +138,6 @@ NodeView::on_property(machina::URIInt key, const Raul::Atom& value)
static const uint32_t active_border_color = 0x00FF00FF;
if (key == URIs::instance().machina_selector) {
- //_node.property_dash() = value.get_bool() ? selector_dash() : 0;
if (value.get_bool()) {
set_dash_length(4.0);
} else {
@@ -162,8 +166,6 @@ NodeView::on_property(machina::URIInt key, const Raul::Atom& value)
on_action_property(i.first, i.second);
}
}
- } else {
- cout << "Unknown property " << key << endl;
}
}