summaryrefslogtreecommitdiff
path: root/src/taskmanager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/taskmanager.cc')
-rw-r--r--src/taskmanager.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/taskmanager.cc b/src/taskmanager.cc
index b50e9a6..60b01d6 100644
--- a/src/taskmanager.cc
+++ b/src/taskmanager.cc
@@ -77,8 +77,10 @@ taskid_t TaskManager::createId() {
return idCount++;
}
-TaskIdList TaskManager::moveTask(taskid_t id, taskid_t to)
+TaskIdListPair TaskManager::moveTask(taskid_t id, taskid_t to)
throw (std::exception) {
+
+ /*
TaskIdList affectedTasks;
try {
@@ -87,8 +89,19 @@ TaskIdList TaskManager::moveTask(taskid_t id, taskid_t to)
catch (std::exception& e) {
throw e;
}
+ */
- return affectedTasks;
+ task_t t = data(id);
+ t.parentid = to;
+
+ TaskIdListRemove tilremove = tree.remove(id);
+ TaskIdListCreate tilcreate = tree.create(to, id, t);
+
+ TaskIdListPair tilpair;
+ tilpair.first = tilremove;
+ tilpair.second = tilcreate;
+
+ return tilpair;
}
TaskIdList TaskManager::removeTask(taskid_t id)