Bug Fix - recurrence
- Fixed bug whereby handleRecurrence was being called after the tasks were loaded and filtered, and thus handleRecurrence operated on a filtered set, and failed. The fix is to move the call to before the TDB::load call, and to add another TDB::loadPending call inside handleRecurrence. This means TDB::load needs to be reentrant without re-reading the file, and can therefore be called twice, with the likelihood of there being a different filter for each call. This in turn led to the problem whereby handleRecurrence would generate the synthetic tasks, which then sat uncommitted in TDB::mNew. The fix for this is that every call to TDB::loadPending gets the contents of TDB::mNew appended (with correct IDs). This bug is what you might call a good one.
This commit is contained in:
@@ -49,7 +49,7 @@ void gatherNextTasks (std::vector <Task>&, std::vector <int>&);
|
||||
void onChangeCallback ();
|
||||
|
||||
// recur.cpp
|
||||
void handleRecurrence (std::vector <Task>&);
|
||||
void handleRecurrence ();
|
||||
Date getNextRecurrence (Date&, std::string&);
|
||||
bool generateDueDates (Task&, std::vector <Date>&);
|
||||
void updateRecurrenceMask (std::vector <Task>&, Task&);
|
||||
|
||||
Reference in New Issue
Block a user