On Tue, Mar 17, 2015 at 11:39 AM, 'Terry Brown' via leo-editor <
[email protected]> wrote:

​> ​
Interesting coincidence that I just tweaked quickMove.py to operate on
​ ​
multiple nodes.
 [snip]

> One important concept is that multi-node selection still has a
single 'current' node, typically the last of node selected.

Thanks for this remark.  It resolves a confusion I've had since day one
about multi-node selections.  Only the *local* gui code needs to handle the
multiple selections stuff.  As long as c.p remains well defined there is no
impact on Leo's core.

I also just noticed the `delete-node` is not running the same code as
> context menu delete, the later attempts to delete all selected nodes.
> I think there have been fairly lengthy debates about the safety and
> predictability of the context menu code before, although I think it
> ended up using
> ​​
> c.deletePositionsInList, so it seems `delete-node`
> should do that too.
>

Imo, deletenodes_rclick_cb looks buggy.  c.deleteOutline handles a variety
of special cases, including @chapter-related hacks.  p.doDelete doesn't do
that.  Otoh, deletenodes_rclick_cb does handle undo.

A quick fix that *might* work would be to use a wrapper function that calls
c.deleteOutline instead of p.doDelete.  However, that handles undo twice,
once in deletenodes_rclick_cb and once in c.deleteOutline.

I agree that ​c.deletePositionsInList is an integral part of any solution.

In short, deletenodes_rclick_cb may need work so that it duplicates the
c.deleteOutline logic "exactly".  One possibility would be to have
c.deleteOutline call an official helper which would contain common code
shared by c.deleteOutline and deletenodes_rclick_cb.

Terry, I haven't time to work on this now, but I'll be happy to add the
helper if you want.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to