- Fixed bug found by John Florian that fails to delete all recurring
  tasks, after task has confirmed that is what is wanted.
This commit is contained in:
Paul Beckingham
2009-07-06 18:51:18 -04:00
parent e8716e68ae
commit 75054617c4

View File

@@ -535,6 +535,7 @@ std::string handleDelete ()
context.tdb.loadPending (tasks, context.filter); context.tdb.loadPending (tasks, context.filter);
// Filter sequence. // Filter sequence.
std::vector <Task> all = tasks;
context.filter.applySequence (tasks, context.sequence); context.filter.applySequence (tasks, context.sequence);
// Determine the end date. // Determine the end date.
@@ -561,7 +562,7 @@ std::string handleDelete ()
{ {
// Scan all pending tasks for siblings of this task, and the parent // Scan all pending tasks for siblings of this task, and the parent
// itself, and delete them. // itself, and delete them.
foreach (sibling, tasks) foreach (sibling, all)
{ {
if (sibling->get ("parent") == parent || if (sibling->get ("parent") == parent ||
sibling->get ("uuid") == parent) sibling->get ("uuid") == parent)
@@ -584,7 +585,7 @@ std::string handleDelete ()
{ {
// Update mask in parent. // Update mask in parent.
task->setStatus (Task::deleted); task->setStatus (Task::deleted);
updateRecurrenceMask (tasks, *task); updateRecurrenceMask (all, *task);
task->set ("end", endTime); task->set ("end", endTime);
context.tdb.update (*task); context.tdb.update (*task);