summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-17 00:14:54 +0000
committerDavid Robillard <d@drobilla.net>2008-11-17 00:14:54 +0000
commit63218d44d6a049de05c2371727adb52fbdcf8fa6 (patch)
tree74077e733826104c5d474b4a726ee351a338a8a0 /src/gui
parent1d3834dd534323467a234fb8ad8bc37eab8ebd0e (diff)
downloadingen-63218d44d6a049de05c2371727adb52fbdcf8fa6.tar.gz
ingen-63218d44d6a049de05c2371727adb52fbdcf8fa6.tar.bz2
ingen-63218d44d6a049de05c2371727adb52fbdcf8fa6.zip
Fix initial active state of created subpatches.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1743 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-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;
}