summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-15 02:01:28 +0000
committerDavid Robillard <d@drobilla.net>2012-08-15 02:01:28 +0000
commit859ace60e8b1c4c0d9c5bea88d8eed1265ea859e (patch)
tree8750f85fa429dea5384bb309c8b09adfc75549e3 /src/server/events
parent68c2d72ba4e2208ff926461bb6faccfbadcf2a61 (diff)
downloadingen-859ace60e8b1c4c0d9c5bea88d8eed1265ea859e.tar.gz
ingen-859ace60e8b1c4c0d9c5bea88d8eed1265ea859e.tar.bz2
ingen-859ace60e8b1c4c0d9c5bea88d8eed1265ea859e.zip
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
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/Move.cpp14
-rw-r--r--src/server/events/Move.hpp1
2 files changed, 5 insertions, 10 deletions
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<PortImpl*>(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