X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiDocument.cpp;h=71eff5b92c4de5481598a5698cfeff0c97e8e8c4;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=6ed27ea4aa3f85dc9f6678ce813185a823528b20;hpb=1ccfe1491456c09d1ad8f6687d6fcdb68443c4d6;p=lyx.git diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 6ed27ea4aa..71eff5b92c 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -624,10 +624,14 @@ GuiDocument::GuiDocument(GuiView & lv) this, SLOT(includeonlyClicked(QTreeWidgetItem *, int))); connect(masterChildModule->includeonlyRB, SIGNAL(toggled(bool)), masterChildModule->childrenTW, SLOT(setEnabled(bool))); + connect(masterChildModule->includeonlyRB, SIGNAL(toggled(bool)), + masterChildModule->maintainAuxCB, SLOT(setEnabled(bool))); connect(masterChildModule->includeallRB, SIGNAL(clicked()), this, SLOT(change_adaptor())); connect(masterChildModule->includeonlyRB, SIGNAL(clicked()), this, SLOT(change_adaptor())); + connect(masterChildModule->maintainAuxCB, SIGNAL(clicked()), + this, SLOT(change_adaptor())); masterChildModule->childrenTW->setColumnCount(2); masterChildModule->childrenTW->headerItem()->setText(0, qt_("Child Document")); masterChildModule->childrenTW->headerItem()->setText(1, qt_("Include to Output")); @@ -2098,6 +2102,8 @@ void GuiDocument::applyView() bp_.addIncludedChildren(*it); } } + bp_.maintain_unincluded_children = + masterChildModule->maintainAuxCB->isChecked(); // Float Placement bp_.float_placement = floatModule->get(); @@ -2481,13 +2487,19 @@ void GuiDocument::paramsToDialog() // Master/Child std::vector children = buffer().getChildren(false); if (children.empty()) { - masterChildModule->setEnabled(false); + masterChildModule->childrenTW->clear(); includeonlys_.clear(); + docPS->showPanel(qt_("Child Documents"), false); + if (docPS->isCurrentPanel(qt_("Child Documents"))) + docPS->setCurrentPanel(qt_("Document Class")); } else { + docPS->showPanel(qt_("Child Documents"), true); masterChildModule->setEnabled(true); includeonlys_ = bp_.getIncludedChildren(); updateIncludeonlys(); } + masterChildModule->maintainAuxCB->setChecked( + bp_.maintain_unincluded_children); // Float Settings floatModule->set(bp_.float_placement); @@ -2725,9 +2737,11 @@ void GuiDocument::updateIncludeonlys() if (includeonlys_.empty()) { masterChildModule->includeallRB->setChecked(true); masterChildModule->childrenTW->setEnabled(false); + masterChildModule->maintainAuxCB->setEnabled(false); } else { masterChildModule->includeonlyRB->setChecked(true); masterChildModule->childrenTW->setEnabled(true); + masterChildModule->maintainAuxCB->setEnabled(true); } QTreeWidgetItem * item = 0; std::vector children = buffer().getChildren(false);