From 859ace60e8b1c4c0d9c5bea88d8eed1265ea859e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 15 Aug 2012 02:01:28 +0000 Subject: Remove EnginePort::move() in favour of Driver::rename_port(). Remove redundant Driver::engine_port(). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4698 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/events/Move.cpp | 14 +++++--------- src/server/events/Move.hpp | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'src/server/events') diff --git a/src/server/events/Move.cpp b/src/server/events/Move.cpp index 5044ce3e..4d72e9ba 100644 --- a/src/server/events/Move.cpp +++ b/src/server/events/Move.cpp @@ -40,8 +40,6 @@ Move::Move(Engine& engine, : Event(engine, client, id, timestamp) , _old_path(path) , _new_path(new_path) - , _parent_patch(NULL) - , _port(NULL) { } @@ -67,7 +65,11 @@ Move::pre_process() return Event::pre_process_done(EXISTS, _new_path); } - _port = dynamic_cast(i->second.get()); + EnginePort* eport = _engine.driver()->port(_old_path); + if (eport) { + _engine.driver()->rename_port(_old_path, _new_path); + } + _engine.store()->rename(i, _new_path); return Event::pre_process_done(SUCCESS); @@ -76,12 +78,6 @@ Move::pre_process() void Move::execute(ProcessContext& context) { - if (_port && !_port->parent()->parent()) { - EnginePort* eport = _engine.driver()->engine_port(context, _new_path); - if (eport) { - eport->move(_new_path); - } - } } void diff --git a/src/server/events/Move.hpp b/src/server/events/Move.hpp index 0e46df1b..6c38347f 100644 --- a/src/server/events/Move.hpp +++ b/src/server/events/Move.hpp @@ -63,7 +63,6 @@ private: const Raul::Path _old_path; const Raul::Path _new_path; PatchImpl* _parent_patch; - PortImpl* _port; }; } // namespace Events -- cgit v1.2.1