From edc21257bcaaae3828a4274b680791aa55d66027 Mon Sep 17 00:00:00 2001
From: David Robillard <d@drobilla.net>
Date: Sun, 2 Feb 2014 19:18:14 +0000
Subject: Don't cut feedback for put events, fixing initial placement of
 subgraph modules.

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

(limited to 'src')

diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 065743dd..c3d4e458 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -381,13 +381,17 @@ Delta::post_process()
 			_create_event->post_process();
 		} else {
 			respond();
-			_engine.broadcaster()->set_ignore_client(_request_client);
 			switch (_type) {
 			case Type::SET:
+				/* Kludge to avoid feedback for set events only.  The GUI
+				   depends on put responses to e.g. initially place blocks.
+				   Some more sensible way of controlling this is needed. */
+				_engine.broadcaster()->set_ignore_client(_request_client);
 				_engine.broadcaster()->set_property(
 					_subject,
 					(*_properties.begin()).first,
 					(*_properties.begin()).second);
+				_engine.broadcaster()->clear_ignore_client();
 				break;
 			case Type::PUT:
 				_engine.broadcaster()->put(_subject, _properties, _context);
@@ -396,7 +400,6 @@ Delta::post_process()
 				_engine.broadcaster()->delta(_subject, _remove, _properties);
 				break;
 			}
-			_engine.broadcaster()->clear_ignore_client();
 		}
 	} else {
 		respond();
-- 
cgit v1.2.1