diff --git a/src/lib/iter-adapter.hpp b/src/lib/iter-adapter.hpp index dd0c029a9..2e491abd1 100644 --- a/src/lib/iter-adapter.hpp +++ b/src/lib/iter-adapter.hpp @@ -265,6 +265,13 @@ namespace lib { ConRef source() { return source_; } const ConRef source() const { return unConst(this)->source_; } + void + resetPos (POS otherPos) + { + pos_ = otherPos; + check(); + } + private: void _maybe_throw() const diff --git a/src/lib/iter-tree-explorer.hpp b/src/lib/iter-tree-explorer.hpp index 95bb7bdb9..9ae370142 100644 --- a/src/lib/iter-tree-explorer.hpp +++ b/src/lib/iter-tree-explorer.hpp @@ -737,12 +737,13 @@ namespace lib { }; + template class ChildExpandableSource { protected: ~ChildExpandableSource() { } ///< @note mix-in interface, not meant to handle objects public: - virtual void expandChildren() =0; + virtual VAL* expandChildren() =0; }; /** @@ -751,17 +752,20 @@ namespace lib { template class PackagedTreeExplorerSource : public WrappedLumieraIter - , public ChildExpandableSource + , public ChildExpandableSource { using Parent = WrappedLumieraIter; + using Val = typename SRC::value_type; public: using Parent::Parent; - virtual void + virtual Val* expandChildren() override { Parent::wrappedIter().expandChildren(); + return Parent::wrappedIter()? & *Parent::wrappedIter() + : nullptr; } }; @@ -786,14 +790,15 @@ namespace lib { void expandChildren() { - using Expandable = iter_explorer::ChildExpandableSource; + using Expandable = iter_explorer::ChildExpandableSource; if (not this->source()) throw error::State ("operating on a disabled default constructed TreeExplorer" ,error::LUMIERA_ERROR_BOTTOM_VALUE); auto source = this->source().get(); - dynamic_cast (source)->expandChildren(); + VAL* changedResult = dynamic_cast (source)->expandChildren(); + this->resetPos (changedResult); } diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index bc68b64f1..cc59534a3 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -6026,14 +6026,14 @@ - - - + + + - + @@ -6042,9 +6042,9 @@ - + - + @@ -6108,7 +6108,7 @@ - + @@ -6290,6 +6290,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -6600,13 +6624,13 @@ - - + + - - + + - + @@ -6621,16 +6645,22 @@ + + + + + + + + + + + + - - - - - - - + @@ -6661,9 +6691,15 @@ + + + + + +