mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Introduce Buffer::hasChildren() and use it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35531 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f5696b8872
commit
7ff1a60d12
@ -2514,6 +2514,12 @@ DocIterator Buffer::firstChildPosition(Buffer const * child)
|
||||
}
|
||||
|
||||
|
||||
bool Buffer::hasChildren() const
|
||||
{
|
||||
return !d->children_positions.empty();
|
||||
}
|
||||
|
||||
|
||||
void Buffer::getChildren(ListOfBuffers & clist, bool grand_children) const
|
||||
{
|
||||
// loop over children
|
||||
|
@ -316,6 +316,9 @@ public:
|
||||
/// \return true if \p child is a child of this \c Buffer.
|
||||
bool isChild(Buffer * child) const;
|
||||
|
||||
/// \return true if this \c Buffer has children
|
||||
bool hasChildren() const;
|
||||
|
||||
/// return a vector of all children (and grandchildren)
|
||||
ListOfBuffers getChildren(bool grand_children = true) const;
|
||||
|
||||
|
@ -2782,10 +2782,7 @@ void GuiDocument::paramsToDialog()
|
||||
}
|
||||
|
||||
// Master/Child
|
||||
ListOfBuffers children;
|
||||
if (bufferview())
|
||||
children = buffer().getChildren(false);
|
||||
if (children.empty()) {
|
||||
if (!buffer().hasChildren()) {
|
||||
masterChildModule->childrenTW->clear();
|
||||
includeonlys_.clear();
|
||||
docPS->showPanel(qt_("Child Documents"), false);
|
||||
|
Loading…
Reference in New Issue
Block a user