delete a subtask with selection on the arrow leaves the arrow

Reported by Lionel Dricot on 2009-12-06
44
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Getting Things GNOME!
High
Unassigned

Bug Description

if you delete a subtask in the task editor by selecting it and that your selection start just before the arrow, the arrow will stay after deletion.

Strangely, if you cut instead of deleting, the arrow is removed (which is correct).

Related branches

lp:~gtg-user/gtg/bugfix-493335
Rejected for merging into lp:~gtg/gtg/old-trunk
Izidor Matušov: Disapprove on 2012-08-14
Bertrand Rousseau (community): Needs Information on 2012-07-05
Lionel Dricot (ploum) on 2009-12-06
Changed in gtg:
milestone: none → 0.2
importance: Undecided → Medium
Lionel Dricot (ploum) on 2009-12-09
Changed in gtg:
milestone: 0.2 → 0.3
Lionel Dricot (ploum) on 2009-12-22
Changed in gtg:
milestone: 0.3 → 0.2.1
status: New → Confirmed
assignee: nobody → Lionel Dricot (ploum)
Lionel Dricot (ploum) on 2009-12-28
Changed in gtg:
assignee: Lionel Dricot (ploum) → nobody
milestone: 0.2.1 → 0.3
Jeff Oliver (jeffrey-oliver) wrote :

Since my bug report was a duplicate of this one, I'll try and describe my observations here instead. First off, this bug is quite irritating for someone like myself who apparently cannot type :). However, I'm having a hard time figuring out where the problem is.

From what I can tell, the subtask is converted back into normal text, arrow and the rest of the text, when the first character of the Subtask's text is deleted. The same behavior is exhibited when you move your cursor after the character and press backspace, or if you move before the character and press delete, or if you highlight the character and press any of backspace, delete, or ctrl-x.

Its almost like something is happening to the tags when this character is being deleted. Is it possible that the indent tag ending is being removed and the subtask tag beginning is being removed too?

Jeff Oliver (jeffrey-oliver) wrote :

The code in _delete_range() looks to be the reason why the task is being deleted from the list...since it had been deleted, the modified function does not properly tag it again later.

There is an if statement that is checking for is_subtask tags, and if the iterator is at the beginning of the tag. Is so, then the subtask is deleted. There probably needs to be another check if there any further text of the line after the iterator.

Jeff Oliver (jeffrey-oliver) wrote :

Revision 712 of trunk has another side effect when deleting the first character of the subtask within the task editor..

I get a new task that shows up in the task tree but it only has the first letter of the task. The task seems to be deleted, since double clicking on this item shows the task i decided to replace it with. Of course, I get the real task in the task viewer also, with all the correct information displaying.

I also get the following error:

*** Node 189@1 not in vr and no path for parent
*** please report a bug against FilteredTree

Restarting gtg seems to clean things up, or changing the filter set, if you're viewing via tag selection.

Lionel Dricot (ploum) on 2010-06-09
tags: added: dailyuse
Lionel Dricot (ploum) on 2010-06-15
Changed in gtg:
status: Confirmed → Triaged
Jeff Oliver (jeffrey-oliver) wrote :

Out of curiosity, what if the behavior of the editor changed such that hitting enter on a line with a subtask does not automatically create another subtask. Instead just go to the next line and require a dash to be entered to create another subtask.

I think personally, I'd like that to be the behavior, mainly due to the fact that typing in a subtask line seems to be much more processor intensive than typing a normal line that ends up being converted to a subtask later.

Changed in gtg:
importance: Medium → High
milestone: 0.3 → 0.4
Izidor Matušov (izidor) on 2011-08-12
tags: added: editor
Alan Gomes Alvino (alangalvino) wrote :

I had added a solution, but not was the ideal solution. The problem is that _delete_range is executed after the delete_selection then the subtask is deleted after the selection and the selection can't be totally deleted.

Changed in gtg:
assignee: nobody → Alan Gomes Alvino (alangalvino)
Izidor Matušov (izidor) on 2012-08-14
Changed in gtg:
status: Triaged → Confirmed
assignee: Alan Gomes Alvino (alangalvino) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers