Misleading behavior of contextmenu.py plugin when deleting nodes

4 views
Skip to first unread message

zpcspm

unread,
Jan 31, 2010, 1:56:12 AM1/31/10
to leo-editor
To illustrate:

- have a node with some content in the body
- right-click to make the popup menu appear
- delete the node

The content of the node body still remains visible. More than that:
leo allows me to edit that content, then save the outline without
complaining. This is misleading and even "scary"! It makes me wonder
if leo doesn't overwrite some of my precious node bodies with this
content.

There are at least two ways to fix this glitch:
- when some nodes gets deleted, select some of their neighbor after
that and update the GUI to display the body content of the selected
node. This is how the minibuffer command "delete-node" works.
- if no node is selected after deletion, which seems to be the case
for contextmenu.py, just clean up the body pane.

Edward K. Ream

unread,
Jan 31, 2010, 7:01:26 AM1/31/10
to leo-e...@googlegroups.com
On Sun, Jan 31, 2010 at 12:56 AM, zpcspm <zpc...@gmail.com> wrote:
> To illustrate:

> The content of the node body still remains visible.

[snip]

> There are at least two ways to fix this glitch:
> - when some nodes gets deleted, select some of their neighbor

This is the only way to fix this problem.

Edward

Terry Brown

unread,
Jan 31, 2010, 10:35:29 AM1/31/10
to leo-e...@googlegroups.com
On Sun, 31 Jan 2010 06:01:26 -0600
"Edward K. Ream" <edre...@gmail.com> wrote:

> > There are at least two ways to fix this glitch:
> > - when some nodes gets deleted, select some of their neighbor
>
> This is the only way to fix this problem.

I've attempted to do that, pushed at 2820. But there's still a possibly severe problem if one of the nodes deleted is the first top level node. I've filed bug #515164 on this, I'm not sure if that getting fixed will completely solve the problem or not.

Cheers -Terry

Terry Brown

unread,
Jan 31, 2010, 10:15:22 PM1/31/10
to leo-e...@googlegroups.com
On Sun, 31 Jan 2010 09:35:29 -0600
Terry Brown <terry_...@yahoo.com> wrote:

> > This is the only way to fix this problem.
>
> I've attempted to do that, pushed at 2820. But there's still a possibly severe problem if one of the nodes deleted is the first top level node. I've filed bug #515164 on this, I'm not sure if that getting fixed will completely solve the problem or not.

The fixing of #515164 (thanks) seems to have taken care of the issues with contextmenu.py Delete, let me know if it's still doing anything weird.

Cheers -Terry

Reply all
Reply to author
Forward
0 new messages