From 63218d44d6a049de05c2371727adb52fbdcf8fa6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 17 Nov 2008 00:14:54 +0000 Subject: Fix initial active state of created subpatches. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1743 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/NewSubpatchWindow.cpp | 2 +- src/gui/PatchView.cpp | 8 ++++++-- 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; } -- cgit v1.2.1