Pavel Sanda wrote:
Tommaso Cucinotta wrote:
Unfortunately, it does not seem to currently work if you open the child document only (e.g., only b.lyx), but not its master -- if there is any

with the expection of documents, which have set default master in settings
there is no way how to know the master. so i think thats ok. only we could
disable the master radio button, so its obvious for the user.
ok, so I would disable the "master document" option if

   currentMainWA()->buffer()->masterBuffer() == currentMainWA()->buffer()

or smth. like that. I'll circulate an updated patch before committing.
dont see to much into searchadv implemenattion, so only one cosmetic issue -
std::vector is used many times - its maybe time for using clause in .cpp
didn't get it -- please, explain
so
you can put only vector. or to use new typedef for the whole std::vector<Buffer *>...?
Actually, I would be tempted to replace this:

void getChildren(std::vector<Buffer *> & children, bool grand_children = true) const;

with smth. like this:

 template <class Iterator>
void getChildren(Iterator const & insertion_point, bool grand_children = true) const;

so that one would retrieve children and insert them into the proper container type one needs.

And also to deprecate (up to remove) this:

 std::vector<Buffer *> getChildren(bool grand_children = true) const;

which mandates creation of a temporary vector with children, and its copy elem by elem into the destination vector. However, I don't expect so many children, so it may be acceptable.

Anyway, for now I would not touch this.

   T.

Reply via email to