GTG

delete a subtask with selection on the arrow leaves the arrow

Bug #493335 reported by Lionel Dricot
42
This bug affects 5 people
Affects Status Importance Assigned to Milestone
GTG
Won't Fix
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

Changed in gtg:
milestone: none → 0.2
importance: Undecided → Medium
Changed in gtg:
milestone: 0.2 → 0.3
Changed in gtg:
milestone: 0.3 → 0.2.1
status: New → Confirmed
assignee: nobody → Lionel Dricot (ploum)
Changed in gtg:
assignee: Lionel Dricot (ploum) → nobody
milestone: 0.2.1 → 0.3
Revision history for this message
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?

Revision history for this message
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.

Revision history for this message
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.

tags: added: dailyuse
Changed in gtg:
status: Confirmed → Triaged
Revision history for this message
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)
tags: added: editor
Revision history for this message
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)
Changed in gtg:
status: Triaged → Confirmed
assignee: Alan Gomes Alvino (alangalvino) → nobody
Izidor Matušov (izidor)
tags: added: github
Jeff Fortin Tam (kiddo)
Changed in gtg:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.