summaryrefslogtreecommitdiff
path: root/libs/ardour/processor.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-08-07 23:31:33 +0000
committerCarl Hetherington <carl@carlh.net>2010-08-07 23:31:33 +0000
commit9a539fd347543ee2f1ba14507570085e2e7b4ea7 (patch)
tree8468e7a109641598a7c7b71ba1e0a0c397a2e608 /libs/ardour/processor.cc
parente8dc5539a049b421523533c68104a9a845d30175 (diff)
Call activate() on plugins when setting state so that they are initialised correctly.
git-svn-id: svn://localhost/ardour2/branches/3.0@7562 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/processor.cc')
-rw-r--r--libs/ardour/processor.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/libs/ardour/processor.cc b/libs/ardour/processor.cc
index 49a2faa742..c75a7720e0 100644
--- a/libs/ardour/processor.cc
+++ b/libs/ardour/processor.cc
@@ -150,10 +150,13 @@ Processor::set_state_2X (const XMLNode & node, int /*version*/)
}
if ((prop = (*i)->property ("active")) != 0) {
- if (_active != string_is_affirmative (prop->value())) {
- _active = !_active;
- _pending_active = _active;
- ActiveChanged (); /* EMIT_SIGNAL */
+ bool const a = string_is_affirmative (prop->value ());
+ if (_active != a) {
+ if (a) {
+ activate ();
+ } else {
+ deactivate ();
+ }
}
}
}
@@ -232,10 +235,13 @@ Processor::set_state (const XMLNode& node, int version)
}
}
- if (_active != string_is_affirmative (prop->value())) {
- _active = !_active;
- _pending_active = _active;
- ActiveChanged (); /* EMIT_SIGNAL */
+ bool const a = string_is_affirmative (prop->value ());
+ if (_active != a) {
+ if (a) {
+ activate ();
+ } else {
+ deactivate ();
+ }
}
return 0;