On Sun, Dec 18, 2011 at 11:33 PM, Terry Brown <[email protected]> wrote:
> The right-click delete is different code, unlike the other deleted
> commands, it can delete multiple selected nodes at once.  I.e. click a
> node in the tree, shift-click another node to select all nodes between,
> or ctrl-click various separate nodes.
>
> These (potentially) multi-level deletes can get very complicated in
> terms of what's left and what's gone afterwards[...]

I wasn't aware of the multi-select functionality.

Does it make sense to change contextmenu.py to fall back to the core
code when there is just a single node selected (untested--but you get
the idea?):

  if len(pl) == 1:
    c.deleteOutline()
    return

That way the behavior will always be the same when there is a single
node selected no matter how the command is executed.

> Anyway, if you want more predictable results with single node
> deletions, use Ctrl-X or bind something to the delete-node command.

While poking around I notice another workaround option is to use
@settings to add another entry to the context menu:

@settings
  @data contextmenu_commands

The in the body put something like:

  delete-node Simple Delete

Then for predictable results choose "Simple Delete" from the context
menu rather than "Delete".  I didn't see a way for "@data
contextmenu_commands" to override other context menu entries (i.e. to
replace the existing "Delete" menu entry)

Brian

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to