From f1c793f7e2148b10610a09a459d9e89b39d2d87b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 19 Mar 2017 13:26:38 +0100 Subject: Fix round-trip preservation of property contexts --- src/server/events/Delta.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/server/events') diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 9f4c1da2..ecc1830a 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -364,7 +364,7 @@ Delta::pre_process(PreProcessContext& ctx) if (value.get() < 1 || value.get() > 128) { _status = Status::INVALID_POLY; } else { - op = SpecialType::POLYPHONY; + op = SpecialType::POLYPHONY; _graph->prepare_internal_poly( *_engine.buffer_factory(), value.get()); } @@ -585,7 +585,7 @@ Delta::post_process() } break; case Type::PATCH: - _engine.broadcaster()->delta(_subject, _remove, _properties); + _engine.broadcaster()->delta(_subject, _remove, _properties, _context); break; } } @@ -597,15 +597,17 @@ Delta::undo(Interface& target) if (_create_event) { _create_event->undo(target); } else if (_type == Type::PATCH) { - target.delta(_subject, _added, _removed); + target.delta(_subject, _added, _removed, _context); } else if (_type == Type::SET || _type == Type::PUT) { if (_removed.size() == 1) { - target.set_property( - _subject, _removed.begin()->first, _removed.begin()->second); + target.set_property(_subject, + _removed.begin()->first, + _removed.begin()->second, + _context); } else if (_removed.empty()) { - target.delta(_subject, _added, {}); + target.delta(_subject, _added, {}, _context); } else { - target.put(_subject, _removed); + target.put(_subject, _removed, _context); } } } -- cgit v1.2.1