From 33aa54fa98783d1da2a322ee136c17df7f9c98a5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 13 Jan 2013 03:16:14 +0000 Subject: Show selector nodes as dashed. git-svn-id: http://svn.drobilla.net/lad/trunk/machina@4950 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/NodeView.cpp | 13 ++++++++----- src/gui/NodeView.hpp | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/gui/NodeView.cpp b/src/gui/NodeView.cpp index 552bd21..a73b996 100644 --- a/src/gui/NodeView.cpp +++ b/src/gui/NodeView.cpp @@ -61,7 +61,7 @@ NodeView::on_double_click(GdkEventButton*) } bool -NodeView::node_is(Raul::Forge& forge, machina::URIInt key) +NodeView::is(Raul::Forge& forge, machina::URIInt key) { const Raul::Atom& value = _node->get(key); return value.type() == forge.Bool && value.get_bool(); @@ -78,14 +78,13 @@ NodeView::on_event(GdkEvent* event) canvas->app()->controller()->set_property( _node->id(), URIs::instance().machina_initial, - forge.make(!node_is(forge, 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(!node_is(forge, - URIs::instance().machina_selector))); + forge.make(!is(forge, URIs::instance().machina_selector))); return true; } } else { @@ -135,7 +134,11 @@ NodeView::on_property(machina::URIInt key, const Raul::Atom& value) if (key == URIs::instance().machina_selector) { //_node.property_dash() = value.get_bool() ? selector_dash() : 0; - std::cerr << "FIXME: dash" << std::endl; + if (value.get_bool()) { + set_dash_length(4.0); + } else { + set_dash_length(0.0); + } } else if (key == URIs::instance().machina_initial) { set_border_width(value.get_bool() ? 4.0 : 1.0); } else if (key == URIs::instance().machina_active) { diff --git a/src/gui/NodeView.hpp b/src/gui/NodeView.hpp index 815e9e2..17f8c44 100644 --- a/src/gui/NodeView.hpp +++ b/src/gui/NodeView.hpp @@ -56,7 +56,7 @@ private: void on_property(machina::URIInt key, const Raul::Atom& value); void on_action_property(machina::URIInt key, const Raul::Atom& value); - bool node_is(Raul::Forge& forge, machina::URIInt key); + bool is(Raul::Forge& forge, machina::URIInt key); Gtk::Window* _window; SPtr _node; -- cgit v1.2.1