#include "Bullet.h"
#include "Chktex.h"
#include "debug.h"
+#include "DocIterator.h"
#include "Encoding.h"
#include "ErrorList.h"
#include "Exporter.h"
// here the buffer should take care that it is
// saved properly, before it goes into the void.
- closing();
+ Buffer * master = getMasterBuffer();
+ 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);
if (!temppath().empty() && !destroyDir(FileName(temppath()))) {
Alert::warning(_("Could not remove temporary directory"),
// Remove any previewed LaTeX snippets associated with this buffer.
graphics::Previews::get().removeLoader(*this);
+
+ closing(this);
}
}
-void Buffer::saveCursor(StableDocIterator cur, StableDocIterator anc)
-{
- cursor_ = cur;
- anchor_ = anc;
-}
-
-
void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to,
Inset::Code code)
{