GNOME Bugzilla – Bug 773554
Tasks duplicate themselves between or within lists, then disappear
Last modified: 2016-10-27 01:41:42 UTC
Created attachment 338544 [details] examples of 'duplicated' tasks between/within different lists There are some very strange interactions between adding a task and switching to a different list. These cause tasks to be shown in other lists than their own, or duplicated multiple times within their own list. But if you then switch away and back to the list, it will look OK... usually! Sometimes you get a _3rd_ copy. :P I think this is purely a presentation issue, as deleting one of the duplicates will make them all vanish. And again, some conditions force the view to fix itself. I don't know the exact patterns yet, will try to figure them out, but for now, I'll just dump a couple of screencasts! then go test some more.
Here's the simplest case: * Create 2 lists: List A, List B * Add a Task A to List A * Go to List B * Task A is there! * Go back to List A * Two copies of Task A are there! * Go to List B again... * It's fine now * And so is List A!
somehow there are a pile of calls to gtd_task_list_view_set_list where the argument list is NULL, but I can't see where those would be coming from...
[reads docs] duh, that argument is explicitly nullable.
The problem seems to be that in the remove_task() function, the offending rows still have new-task-mode set, so they do not get removed. However they are clearly not in new task mode, because the label is shown, rather than the entry. This property somehow is not updated soon enough.
No, sorry... I was passing the wrong pointer to my check for new-task-mode. So that can't be the reason why the list rows are not being deleted when they should. Please disregard that, and I will stop making terrible guesses now. :)
Created attachment 338557 [details] [review] task-list-view: fix newly-created task not being removed When the user creates the tasklist, the task is not added to the tasks' GList, and we eventually fail to remove it (since it's not in the list). Fix that by properly adding the task to the internal list of tasks.
Thanks for the report. Attachment 338557 [details] pushed as 2cfba61 - task-list-view: fix newly-created task not being removed
Works great now, thanks for the quick fix!