On Sunday, May 3, 2020 at 4:11:48 PM UTC-5, vitalije wrote:
*What about user scripts that modify outline?*
>
> User scripts should work without any modification. They can freely modify
> outline using the standard Position class or even directly manipulating
> v-nodes. This will certainly cause tree widget data model to get out of
> sync. The possible solution would be to make a snapshot of the current
> outline shape before executing user script. When the script finishes, Leo
> will compare outline shape with the last snapshot and apply differences to
> the tree data-model to re-synchronize it. The code for this
> re-synchronization can be found in another branch tree-refresh.
>
I checked out tree-refresh, then attempted to clone qt_tree.py:
Traceback (most recent call last):
File "c:\leo.repo\leo-editor\leo\core\leoCommands.py", line 2282, in
executeAnyCommand
return command(event)
File "c:\leo.repo\leo-editor\leo\core\leoGlobals.py", line 245, in
commander_command_wrapper
method(event=event)
File "c:\leo.repo\leo-editor\leo\commands\commanderOutlineCommands.py",
line 736, in clone
c.redraw(clone)
File "c:\leo.repo\leo-editor\leo\core\leoCommands.py", line 2950, in
redraw
p2 = c.frame.tree.redraw(p)
File "c:\leo.repo\leo-editor\leo\plugins\qt_tree.py", line 309, in
full_redraw
self.drawTopTree(p)
File "c:\leo.repo\leo-editor\leo\plugins\qt_tree.py", line 635, in
drawTopTree
apply_deletes(deletes)
File "c:\leo.repo\leo-editor\leo\plugins\qt_tree.py", line 596, in
apply_deletes
v2i[vch].remove(chitem)
ValueError: list.remove(x): x not in list
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 view this discussion on the web visit
https://groups.google.com/d/msgid/leo-editor/be597d93-49de-4666-b6b4-5dcda3d5d9ae%40googlegroups.com.