diff options
Diffstat (limited to 'src/gui/NodeView.cpp')
-rw-r--r-- | src/gui/NodeView.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/NodeView.cpp b/src/gui/NodeView.cpp index 77ccd4d..2312493 100644 --- a/src/gui/NodeView.cpp +++ b/src/gui/NodeView.cpp @@ -40,8 +40,8 @@ NodeView::NodeView(Gtk::Window* window, , _default_border_color(_border_color) , _old_color(_color) { - signal_clicked.connect( - sigc::mem_fun(this, &NodeView::handle_click)); + _signal_clicked.connect( + sigc::mem_fun(this, &NodeView::on_click)); node->signal_property.connect( sigc::mem_fun(this, &NodeView::on_property)); @@ -60,8 +60,8 @@ NodeView::node_is(Machina::URIInt key) return value.type() == Raul::Atom::BOOL && value.get_bool(); } -void -NodeView::handle_click(GdkEventButton* event) +bool +NodeView::on_click(GdkEventButton* event) { if (event->state & GDK_CONTROL_MASK) { MachinaCanvas* canvas = dynamic_cast<MachinaCanvas*>(_canvas); @@ -70,13 +70,16 @@ NodeView::handle_click(GdkEventButton* event) _node->id(), URIs::instance().machina_initial, !node_is(URIs::instance().machina_initial)); + return true; } else if (event->button == 3) { canvas->app()->controller()->set_property( _node->id(), URIs::instance().machina_selector, !node_is(URIs::instance().machina_selector)); + return true; } } + return false; } static std::string |