summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/NewSubpatchWindow.cpp2
-rw-r--r--src/gui/PatchView.cpp8
2 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/NewSubpatchWindow.cpp b/src/gui/NewSubpatchWindow.cpp
index 580ebb51..9fd7be07 100644
--- a/src/gui/NewSubpatchWindow.cpp
+++ b/src/gui/NewSubpatchWindow.cpp
@@ -96,7 +96,7 @@ NewSubpatchWindow::ok_clicked()
for (GraphObject::Variables::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
App::instance().engine()->set_variable(path, i->first, i->second);
- App::instance().engine()->set_property(_patch->path(), "ingen:enabled", (bool)true);
+ App::instance().engine()->set_property(path, "ingen:enabled", (bool)true);
hide();
}
diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp
index 13689806..1c5c2c51 100644
--- a/src/gui/PatchView.cpp
+++ b/src/gui/PatchView.cpp
@@ -184,8 +184,12 @@ void
PatchView::property_changed(const std::string& predicate, const Raul::Atom& value)
{
_enable_signal = false;
- if (predicate == "ingen:enabled" && value.type() == Atom::BOOL)
- _process_but->set_active(value.get_bool());
+ if (predicate == "ingen:enabled") {
+ if (value.type() == Atom::BOOL)
+ _process_but->set_active(value.get_bool());
+ else
+ cerr << "WARNING: Bad type for ingen:enabled property: " << value.type() << endl;
+ }
_enable_signal = true;
}