Patch #1467 2006-09-09 15:22

jmaster

TODO-list filter by user bug
Download
1467-TODO_list_filt.patch (881 bytes)
Category
Plugin::Bugfix
Status
Closed
Close date
2006-10-06 14:29
Assigned to
 
Index: src/plugins/todo/todolistview.cpp
===================================================================
--- src/plugins/todo/todolistview.cpp    (revision 2964)
+++ src/plugins/todo/todolistview.cpp    (arbetskopia)
@@ -123,6 +123,7 @@
             GetListControl()->SetItem(idx, 3, item.priorityStr);
             GetListControl()->SetItem(idx, 4, item.lineStr);
             GetListControl()->SetItem(idx, 5, item.filename);
+            GetListControl()->SetItemData(idx, i);
         }
     }
     GetListControl()->Thaw();
@@ -375,9 +376,11 @@
 {
     if (event.GetIndex() == -1)
         return;
-    wxString file = m_Items[event.GetIndex()].filename;
-    long int line = m_Items[event.GetIndex()].line;
 
+    unsigned int idx = GetListControl()->GetItemData(event.GetIndex());
+    wxString file = m_Items[idx].filename;
+    long int line = m_Items[idx].line;
+
     if (file.IsEmpty() || line <= 0)
         return;
 
jmaster 2006-09-09 15:32

To reproduce the bug:

1. Create some todo-items and assign them to different users

2. Choose to only show one specific user

3. If you click on item number x, the editor will go the the file and line of the todo-item number x in the unfiltered todo-list

killerbot 2006-10-06 14:29

applied, thx

svn 3022