// GuiView already destroyed
gui_ = 0;
- Buffer const * master = masterBuffer();
- if (master != this && use_gui) {
- // We are closing buf which was a child document so we
- // must update the labels and section numbering of its master
- // Buffer.
- updateLabels(*master);
- master->updateMacros();
- }
-
- resetChildDocuments(false);
+ // clear references to children in macro tables
+ d->children_positions.clear();
+ d->position_to_children.clear();
if (!d->temppath.destroyDirectory()) {
Alert::warning(_("Could not remove temporary directory"),
if (*cit == '\n') {
if (autobreakrows && (!par.empty() || par.allowEmpty())) {
breakParagraph(params(), pars, pit, pos,
- par.layout()->isEnvironment());
+ par.layout().isEnvironment());
++pit;
pos = 0;
space_inserted = true;
// increased depth?
if ((par.params().depth() > depth
|| par.params().leftIndent() != leftIndent)
- && par.layout()->isEnvironment()) {
+ && par.layout().isEnvironment()) {
updateBlockMacros(it, scope);
continue;
}
// set scope for macros in this paragraph:
// * either the "old" outer scope
// * or the scope ending after the environment
- if (par.layout()->isEnvironment()) {
+ if (par.layout().isEnvironment()) {
// find end of environment block,
DocIterator envEnd = it;
pit_type n = it.lastpit() + 1;
}
-void Buffer::resetChildDocuments(bool close_them) const
-{
- if (text().empty())
- return;
-
- for (InsetIterator it = inset_iterator_begin(inset()); it; ++it) {
- if (it->lyxCode() != INCLUDE_CODE)
- continue;
- InsetCommand const & inset = static_cast<InsetCommand const &>(*it);
- InsetCommandParams const & ip = inset.params();
-
- resetParentBuffer(this, ip, close_them);
- }
-
- // clear references to children in macro tables
- d->children_positions.clear();
- d->position_to_children.clear();
-}
-
-
string Buffer::bufferFormat() const
{
if (isDocBook())