]> git.lyx.org Git - lyx.git/blobdiff - src/insets/Inset.cpp
#7379 avoid the wrap spell check question when buffer is empty
[lyx.git] / src / insets / Inset.cpp
index 8566129b3a0172ce77bd4909ae09bfd3a956581e..c93018e0755acb2d0013c56782c00ecb6ee98c10 100644 (file)
@@ -254,7 +254,18 @@ docstring Inset::toolTip(BufferView const &, int, int) const
 }
 
 
+void Inset::forToc(docstring &, size_t) const
+{
+}
+
+
 docstring Inset::contextMenu(BufferView const &, int, int) const
+{
+       return contextMenuName();
+}
+
+
+docstring Inset::contextMenuName() const
 {
        return docstring();
 }
@@ -612,6 +623,12 @@ void Inset::setDimCache(MetricsInfo const & mi, Dimension const & dim) const
 
 Buffer const * Inset::updateFrontend() const
 {
+       //FIXME (Abdel 03/12/10): see bugs #6814 and #6949
+       // If the Buffer is null and we end up here this is most probably because we
+       // are in the CutAndPaste stack. See InsetGraphics, RenderGraphics and
+       // RenderPreview.
+       if (!buffer_)
+               return 0;
        return theApp() ? theApp()->updateInset(this) : 0;
 }