From fb0020e43a0934a110fea7be8f5a2fcf1eb61b6e Mon Sep 17 00:00:00 2001
From: David Robillard <d@drobilla.net>
Date: Wed, 25 Dec 2013 22:06:26 +0000
Subject: Fix handling setting of several special properties per request.

git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5208 a436a847-0d15-0410-975c-d299462d15a1
---
 src/server/events/Delta.cpp | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

(limited to 'src')

diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 831b4c52..2e6ab18c 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -200,7 +200,9 @@ Delta::pre_process()
 				if (key == uris.ingen_controlBinding && value == uris.wildcard) {
 					op = SpecialType::CONTROL_BINDING;  // Internal block learn
 				}
-			} else if ((_graph = dynamic_cast<GraphImpl*>(_object))) {
+			}
+
+			if ((_graph = dynamic_cast<GraphImpl*>(_object))) {
 				if (key == uris.ingen_enabled) {
 					if (value.type() == uris.forge.Bool) {
 						op = SpecialType::ENABLE;
@@ -223,7 +225,9 @@ Delta::pre_process()
 						_status = Status::BAD_VALUE_TYPE;
 					}
 				}
-			} else if (key == uris.ingen_polyphonic) {
+			}
+
+			if (key == uris.ingen_polyphonic) {
 				GraphImpl* parent = dynamic_cast<GraphImpl*>(obj->parent());
 				if (parent) {
 					if (value.type() == uris.forge.Bool) {
@@ -286,9 +290,9 @@ Delta::execute(ProcessContext& context)
 
 	std::vector<SpecialType>::const_iterator t = _types.begin();
 	for (const auto& p : _properties) {
-		const Raul::URI&  key   = p.first;
-		const Atom& value = p.second;
-		switch (*t) {
+		const Raul::URI& key   = p.first;
+		const Atom&      value = p.second;
+		switch (*t++) {
 		case SpecialType::ENABLE_BROADCAST:
 			if (port) {
 				port->enable_monitoring(value.get<int32_t>());
-- 
cgit v1.2.1