diff options
author | David Robillard <d@drobilla.net> | 2017-03-19 13:26:38 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-03-20 02:58:56 +0100 |
commit | f1c793f7e2148b10610a09a459d9e89b39d2d87b (patch) | |
tree | b898407dce08af0f2f978d59a85d4887d8555b54 /src/server/events/Delta.cpp | |
parent | efc0fe0a973db706d9409b345ad6fae585f4388c (diff) | |
download | ingen-f1c793f7e2148b10610a09a459d9e89b39d2d87b.tar.gz ingen-f1c793f7e2148b10610a09a459d9e89b39d2d87b.tar.bz2 ingen-f1c793f7e2148b10610a09a459d9e89b39d2d87b.zip |
Fix round-trip preservation of property contexts
Diffstat (limited to 'src/server/events/Delta.cpp')
-rw-r--r-- | src/server/events/Delta.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
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<int32_t>() < 1 || value.get<int32_t>() > 128) { _status = Status::INVALID_POLY; } else { - op = SpecialType::POLYPHONY; + op = SpecialType::POLYPHONY; _graph->prepare_internal_poly( *_engine.buffer_factory(), value.get<int32_t>()); } @@ -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); } } } |