]> git.lyx.org Git - lyx.git/blobdiff - src/insets/Inset.cpp
Remove all BufferParam arguments in InsetXXX methods (since insets know about their...
[lyx.git] / src / insets / Inset.cpp
index 720254a7244a9670816b381eda588d63ab8b4f6e..dbefc1279dbab1415c91227004d7931343676bf0 100644 (file)
@@ -210,6 +210,7 @@ string insetName(InsetCode c)
 
 void Inset::dispatch(Cursor & cur, FuncRequest & cmd)
 {
+       LASSERT(cur.buffer() == &buffer(), return);
        cur.updateFlags(Update::Force | Update::FitCursor);
        cur.dispatched();
        doDispatch(cur, cmd);
@@ -448,9 +449,9 @@ bool Inset::covers(BufferView const & bv, int x, int y) const
 }
 
 
-InsetLayout const & Inset::getLayout(BufferParams const & bp) const
+InsetLayout const & Inset::getLayout() const
 {
-       return bp.documentClass().insetLayout(name());
+       return buffer().params().documentClass().insetLayout(name());
 }
 
 
@@ -466,6 +467,12 @@ ColorCode Inset::backgroundColor() const
 }
 
 
+ColorCode Inset::labelColor() const
+{
+       return Color_foreground;
+}
+
+
 void Inset::setPosCache(PainterInfo const & pi, int x, int y) const
 {
        //LYXERR("Inset: set position cache to " << x << " " << y);