On Monday, August 31, 2020 at 10:53:11 AM UTC-5, Edward K. Ream wrote: Work on #1631 <https://github.com/leo-editor/leo-editor/issues/1631> has > taken an unexpected turn. The issue has been renamed "Eliminate > v.expandedPositions". Instead of using this list (and trying to update it), > c.shouldBeExpanded(p) uses *no *data that must be kept in sync with the > outline. >
Tests show there are unexpected difficulties with eliminating v.expandedPositions. The present Qt gui code tacitly assumes that c.shouldBeExpanded will deliver a value that is (roughly) in sync with the actual expansion status of the gui nodes. I just now noticed that the new code (in the bug-1631 branch) does not always properly indicate that cloned nodes have children. This likely dooms the present code. This is very tricky code. I'm not entirely sure why the legacy code (in devel) works as well as it does, but it mostly *does* work. *Summary* There are unexpected dependencies between the Qt gui code and c.shouldBeExpanded. The changes in the bug-1631 branch do not work. Changing the representation of the v.expandedPositions list will fail in different ways, with different consequences. The fundamental problem: there is *no* easy, correct way to describe a position that will persist when the outline changes. Cute tricks have *no* chance of working. Let me be clear. The problem is not the position class itself. This is a hard problem. So we are left with a stark choice: either live with the present situation, or find a way to update v.expandedPositions rigorously whenever the outline changes. Even that may not suffice due to subtle interactions between the gui code and the data model. Edward P.S. There is another alternative, namely expand/contract all clones (of the same node) the same way. This was the status quo ante before v.expandedPositions existed. I would rather not do that, but this way isn't actually terrible because it is actually rare to have two sibling clones. EKR -- 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/f552f555-01c9-4fe9-ae6f-7d4b8c18b90fo%40googlegroups.com.
