#include <config.h>
#include "Bidi.h"
-#include "BufferView.h"
#include "Buffer.h"
-#include "Cursor.h"
+#include "BufferView.h"
#include "CoordCache.h"
+#include "Cursor.h"
#include "CutAndPaste.h"
#include "DispatchResult.h"
#include "Encoding.h"
+#include "Font.h"
#include "FuncRequest.h"
#include "Language.h"
#include "lfuns.h"
-#include "Font.h"
#include "LyXFunc.h" // only for setMessage()
#include "LyXRC.h"
-#include "Row.h"
-#include "Text.h"
-#include "Paragraph.h"
#include "paragraph_funcs.h"
+#include "Paragraph.h"
#include "ParIterator.h"
+#include "Row.h"
+#include "Text.h"
#include "TextMetrics.h"
+#include "TocBackend.h"
#include "support/debug.h"
#include "support/docstream.h"
}
+void Cursor::checkBufferStructure()
+{
+ if (paragraph().layout()->toclevel == Layout::NOT_IN_TOC)
+ return;
+ Buffer const * master = buffer().masterBuffer();
+ master->tocBackend().updateItem(ParConstIterator(*this));
+ master->structureChanged();
+}
+
+
} // namespace lyx