[gnome-todo/wip/gbsneto/subtasks] task-list-view: reset dnd row when changing list



commit 7dda352c0804373c7dcf3e12e591eb862fd88c32
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Oct 14 22:51:20 2016 -0300

    task-list-view: reset dnd row when changing list
    
    To avoid some nasty segfaults.

 src/gtd-task-list-view.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gtd-task-list-view.c b/src/gtd-task-list-view.c
index 6b36e98..8434c9a 100644
--- a/src/gtd-task-list-view.c
+++ b/src/gtd-task-list-view.c
@@ -1389,6 +1389,9 @@ gtd_task_list_view_set_list (GtdTaskListView *view,
   old_list = priv->list;
   priv->complete_tasks = 0;
 
+  /* Reset the DnD parent row */
+  gtd_dnd_row_set_row_above (GTD_DND_ROW (priv->dnd_row), NULL);
+
   /* Remove the tasks that are in the current list, but not in the new list */
   for (l = old_list; l != NULL; l = l->next)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]