It seems that p.setDirty propagates dirty status not only to the ancestors but also to the all descendant nodes as well, nodes that are roots of external files (v.isAnyAtFileNode()). At first I thought this was unnecessary, but then I realized this is probably to allow that change in the ancestor can change resulting path of the descendant file nodes which would require those nodes to be written on the next save operation.
If this is the reason to propagate dirty status down the tree, then perhaps it can be skipped if this node doesn't contain at-path or any other directive that might cause need for writing descendant file nodes. That would be almost always the case. Changing for example top level node "Code" in LeoPyRef.leo causes more than 160 files to be set dirty on the next save command, which seems to me wrong. Vitalije -- 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 https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
