summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/NodeModule.cpp20
-rw-r--r--src/libs/gui/NodeModule.hpp1
2 files changed, 20 insertions, 1 deletions
diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp
index 7ac86e40..c38a898b 100644
--- a/src/libs/gui/NodeModule.cpp
+++ b/src/libs/gui/NodeModule.cpp
@@ -315,8 +315,26 @@ NodeModule::set_variable(const string& key, const Atom& value)
void
NodeModule::set_property(const string& key, const Atom& value)
{
- if (key == "ingen:polyphonic" && value.type() == Atom::BOOL)
+ if (key == "ingen:polyphonic" && value.type() == Atom::BOOL) {
set_stacked_border(value.get_bool());
+ } else if (key == "ingen:selected" && value.type() == Atom::BOOL) {
+ if (value.get_bool() != selected()) {
+ if (value.get_bool())
+ _canvas.lock()->select_item(shared_from_this());
+ else
+ _canvas.lock()->unselect_item(shared_from_this());
+ }
+ }
+}
+
+
+void
+NodeModule::set_selected(bool b)
+{
+ if (b != selected()) {
+ Module::set_selected(b);
+ App::instance().engine()->set_property(_node->path(), "ingen:selected", b);
+ }
}
diff --git a/src/libs/gui/NodeModule.hpp b/src/libs/gui/NodeModule.hpp
index 3bf2d3eb..2b592446 100644
--- a/src/libs/gui/NodeModule.hpp
+++ b/src/libs/gui/NodeModule.hpp
@@ -70,6 +70,7 @@ protected:
void embed_gui(bool embed);
bool popup_gui();
void on_gui_window_close();
+ void set_selected(bool b);
void rename();
void set_variable(const std::string& key, const Atom& value);