TreePath ConvertStorePathToModelPath(TreePath path) { TreeModelSort sort = (TreeModelSort)treeDebaters.Model; TreeModelFilter filter = (TreeModelFilter)sort.Model; return(sort.ConvertChildPathToPath(filter.ConvertChildPathToPath(path))); }
public void SelectPath(TreePath path) { if (path == null) { return; } path = filter.ConvertChildPathToPath(path); path = sort.ConvertChildPathToPath(path); if (path != null) { Selection.SelectPath(path); } }
void NewUserTaskClicked(object obj, EventArgs e) { TaskListEntry task = new TaskListEntry(); task.WorkspaceObject = IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem; updating = true; TaskService.UserTasks.Add(task); updating = false; TreeIter iter = store.AppendValues(GettextCatalog.GetString(Enum.GetName(typeof(TaskPriority), task.Priority)), task.Completed, task.Description, task, GetColorByPriority(task.Priority), task.Completed ? (int)Pango.Weight.Light : (int)Pango.Weight.Bold); view.Selection.SelectIter(sortModel.ConvertChildIterToIter(iter)); TreePath sortedPath = sortModel.ConvertChildPathToPath(store.GetPath(iter)); view.ScrollToCell(sortedPath, view.Columns[(int)Columns.Description], true, 0, 0); view.SetCursorOnCell(sortedPath, view.Columns[(int)Columns.Description], cellRendDesc, true); TaskService.SaveUserTasks(task.WorkspaceObject); }